for 巢狀迴圈
#include#include #include using namespace std; int main(int argc, char *argv[]) { int multiplier, faciend; for (faciend=1; faciend<=9; faciend++) { for (multiplier=1; multiplier<=9; multiplier++) { cout << multiplier << '*' << faciend << '=' << setw(2) << multiplier*faciend << '\t'; } cout << endl; } system("PAUSE"); return EXIT_SUCCESS; }