//Calculation of
square and cube of series
#include<stdio.h>
#include<conio.h>
#include<math.h>
void
main()
{
int
i,n;
clrscr();
printf("\n\nSquare
and cube upto\n");
scanf("%d",&n);
printf("**********************\n");
printf("No\tSq\tCube\n");
printf("**********************\n");
for(i=1;i<=n;i++)
{
printf("%d\t%d\t%d\n",i,i*i,i*i*i);
}
printf("**********************\n");
getch();
}
No comments:
Post a Comment
Note: only a member of this blog may post a comment.