打印九九乘法表

This commit is contained in:
flykhan 2023-06-16 16:01:52 +08:00
parent 12e18ec415
commit 74f9c23f9e
1 changed files with 19 additions and 0 deletions

19
day5/chengfa99.cpp Normal file
View File

@ -0,0 +1,19 @@
// 打印九九乘法表
#include <iostream>
using namespace std;
int main()
{
for (int i = 1; i < 10; i++)
{
for (int j = 1; j < 10; j++)
{
if (j <= i)
cout << i << "*" << j << "=" << i * j << "\t";
}
cout << endl;
}
return 0;
}