1 //嵌套循环 乘法口诀 2 #include <iostream> 3 using namespace std; 4 int main() 5 { 6 int i ,j; 7 for ( i = 1; i <= 9; i++) 8 { 9 for (j = 1; j <= i; j++) 10 { 11 cout << j<< "*"<<i<< "=" << j*i<< " "; 12 //printf("%d * %d = %d\t", j, i,j*i); 13 } 14 15 cout << endl; 16 17 } 18 19 20 21 22 23 system("pause"); 24 return 0; 25 }