Write a program to accept value of n and print n2
and n3
.
Answers
Answered by
0
Answer:
5answer
Explanation:
answer my created by answer me
Answered by
0
Answer:
include<stdio.h> //for standard input and ouput
#include<conio.h> //for clrscr()
//Main function
void main()
{
int n,n2,n3,n4,n5;
clrscr(); //for clear screen
printf(“\n Enter a number: “);
scanf(“%d”,&n);
n2=n*n;
n3=n*n*n;
n4=n*n*n*n;
n5=n*n*n*n*n;
printf(“\n The square of given number is: %d”,n2);
printf(“\n The cube of given number is: %d”,n3);
printf(“\n The quad of given number is: %d”,n4);
printf(“\n The penta of given number is: %d”,n5);
getch(); //To hold the output screen
}
//End of main()
Similar questions