Showing posts with label WAP to print series from 1 to 10 and find its square and cube. Show all posts
Showing posts with label WAP to print series from 1 to 10 and find its square and cube. Show all posts

SQUARE & CUBE

WAP to print series from 1 to 10 & find its square and cube


void main ()

{

int a=1,sqr=0,cube=0;

clrscr ();

while (a<=10)

{

sqr=pow(a,2);

cube=pow(a,3);

printf ("%d\t %d\t %d\n",a,sqr,cube);

a++;

}

getch ();

}



Labels