Best collection of C programs
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
Tuesday, January 4, 2011
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 ();
}
Older Posts
Home
Subscribe to:
Posts (Atom)