C++写一个99乘法表
时间: 2023-05-13 20:05:18 浏览: 51
Sure, here's the code for printing the 99 multiplication table in C:
```
#include <stdio.h>
int main() {
int i, j;
for (i = 1; i <= 9; i++) {
for (j = 1; j <= i; j++) {
printf("%d*%d=%d\t", j, i, i*j);
}
printf("\n");
}
return 0;
}
```
This code uses nested loops to print out the multiplication table in a tabular format. The outer loop iterates over the rows, while the inner loop iterates over the columns. The `printf` statement inside the inner loop prints out each multiplication result, separated by tabs.
相关问题
用c++写一个99乘法表代码
好的,以下是用 C 语言写的 99 乘法表代码:
```c
#include <stdio.h>
int main() {
int i, j;
for (i = 1; i <= 9; i++) {
for (j = 1; j <= i; j++) {
printf("%d*%d=%d\t", j, i, i*j);
}
printf("\n");
}
return 0;
}
```
希望能够帮到你!
帮我写一个c++99乘法表
好的,以下是 C 语言实现的 99 乘法表代码:
#include <stdio.h>
int main() {
int i, j;
for (i = 1; i <= 9; i++) {
for (j = 1; j <= i; j++) {
printf("%d*%d=%d\t", j, i, i*j);
}
printf("\n");
}
return ;
}
希望对你有帮助!