版权声明:转载请附上文章地址 https://blog.csdn.net/weixin_38134491/article/details/85254769
问题:
write a program that calculates the squares and cubes of the numbers from 0 to 10 and uses tabs to print the following table of values:
#include<stdio.h>
#include<stdlib.h>
int main(void) {
printf("number\tsqure\tcube\t\n");
for (int i = 0; i <= 10; i++) {
printf("%d\t%d\t%d\n", i,i*i,i*i*i);
}
system("pause");
return 0;
}