#include<stdio.h>
#include<conio.h>
main()
{
int a,b,n;
clrscr();
printf("\n enter any number for cube and square value");
scanf("%d",&n);
a=n*n;
b=n*n*n;
printf("square is %d and cube is %d",a,b)
getch();
}
OUTPUT
enter any number for cube and square value 3
square is 9 cube is 27
#include<conio.h>
main()
{
int a,b,n;
clrscr();
printf("\n enter any number for cube and square value");
scanf("%d",&n);
a=n*n;
b=n*n*n;
printf("square is %d and cube is %d",a,b)
getch();
}
OUTPUT
enter any number for cube and square value 3
square is 9 cube is 27
No comments:
Post a Comment