C:\Users\weixq\Desktop
加减乘除各种表,代码实现,有 的给个币,有分的给个分,小白编码,谢谢老板打赏~~~~~~
#include <stdio.h>
//黄1
void test1(){
for (int i = 1; i <= 9; i++) {
for (int j = 1; j <= 10-i; j++) {
printf("%d*%d=%d\t", j, j+i-1, j*j );
}
printf("\n");
}
}
//绿2
void test2(){
for (int i = 9; i >=1; i--) {
for (int k = 1; k < 10-i; k++) {
printf("\t\t");
}
for (int j = 1; j <= i; j++) {
printf("%2d/%d=%d\t", j*i, i, j);
}
printf("\n");
}
}
//粉色3
void test3(){
for (int i = 1 ; i <= 10 ; i++) {
for (int j = 1; j < i ; j++) {
printf("%d+%d=%d\t", i-j, j, i);
}
printf("\n");
}
}
//蓝四
void test4(){
for (int i = 1; i <= 9; i++) {
for (int k = 1; k <= 9-i; k++) {
printf("\t\t");
}
for (int j = 1; j <= i; j++) {
printf("%2d-%d=%d\t", i+1, i+1-j, j);
}
printf("\n");
}
}
int main(){
test1();
test2();
test3();
test4();
}
|
|