Best collection of C programs
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 ();
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment