C program to calculate the square and cube of the first 10 natural numbers.
#include
<stdio.h>
#include<conio.h>
main()
{
int
i;
printf("\n
no \tsquare\tcube");
for
(i=1;i<=10;i++)
printf("\n%d\t%d\t%d",i,i*i,i*i*i);
getch();
}
#include
<stdio.h>
#include<conio.h>
main()
{
int
i;
printf("\n
no \tsquare\tcube");
for
(i=1;i<=10;i++)
printf("\n%d\t%d\t%d",i,i*i,i*i*i);
getch();
}
About Govind Prasad Joshi
Copyright (c) 2022 neb-see-solution.com All Right Reseved
No comments:
Post a Comment