for(int k=1;k<=9;k++) { cout<<"case "<<k<<":cout<<\""; for(int i=1;i<=k;i++) { for(int j=1;j<=i;j++) { c=pow(i,j); cout<<i<<" ^ "<<j<<" = "<<c<<" "; } cout<<"\\n"; } cout<<"\";break;\n"; }