write a c program to display a table of squares and cube of given number.
Answers
Answered by
1
Explanation:
include<stdio.h>
#include<conio.h>
void main()
{
int a,s,c;
clrscr();
printf("\n Enter A Number: ");
scanf("%d",&a);
s=a*a; //Square = number * number
c=s*a; //Cube = Square * number
printf("\n Square of %d is = %d",a,s);
printf("\n\n Cube of %d is = %d",a,c);
getch();
}
Answered by
1
https://ecomputernotes.com/what-is-c/control-structures/write-a-c-program-to-display-a-table-of-squares-and-cubes
u can see this website for your reference
Similar questions