#include <stdio.h>
int main( void )
{
int lower, upper, index;
int square, cube;
printf("Enter starting integer: ");
scanf("%d", &lower);
printf("Enter ending integer: ");
scanf("%d", &upper);
printf("%5s %10s %15s/n", "num", "square", "cube");
for (index = lower; index <= upper; index++)
{
square = index * index;
cube = index * square;
printf("%5d %10d %15d/n", index, square, cube);
}
return 0;
}
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/266555.html