Could you please help me with this question using C not C Wr
Could you please help me with this question using C not C++
Write a program that calculates the squares and cubes of the numbers from 0 to 10 and use tabs to print the following table of values: (You should use for-statement.)Solution
#include <stdio.h>
int main(void)
{
int num;
printf(\"\ number\\t\\tsquare\\t\\tcube\");
for(num=0;num<=10;num++) // for loop to compute square and cube of number starting from 0 to 10
{
printf(\"\ %d\\t\\t%d\\t\\t%d\",i,i*i,i*i*i); // use of \\t tabs
}
return 0;
}
output:
