- #include <iostream>
- #include <cstdlib>
- using namespace std;
- int main()
- {
- cout << "九九乘法表" << endl;
- cout << "==========" << endl;
- int z[9][9];
- for(int x = 0; x < 9; x++)
- {
- for(int y = 0; y < 9; y++)
- {
- z[x][y] = (x+1) * (y+1);
- }
- }
- for (int x = 0; x < 9; x++)
- {
- for ( int y = 0; y < 9; y++)
- {
- cout << z[x][y] <<"\t";
- }
- cout << endl;
- }
- system ("pause");
- return 0;
- }
複製代碼 |