用c语言写一个乘法口诀表要求:左对齐
#include <stdio.h>
int main() {
int i, j;
for(i = 1; i <= 9; i++) {
for(j = 1; j <= i; j++) {
printf("%d x %d = %-2d ", j, i, i*j); // 左对齐
}
printf("\n");
}
return 0;
}
原文地址: https://www.cveoy.top/t/topic/WpP 著作权归作者所有。请勿转载和采集!