write a program that a 5 digit number and calculates 2
power that number and prints it.
Answer Posted / ayushi rastogi
/* We assume that user enter 5 digit No */
#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
double No,length=2;
double pwrNo;
printf("Please Enter the 5 digit No.:");
printf("\n");
scanf("%d",&No);
pwrNo=pow(No,2);
printf("\n");
printf("Power of %u No is %u",No,pwrNo);
}
| Is This Answer Correct ? | 6 Yes | 5 No |
Post New Answer View All Answers
What is an undefined behavior and sequence points
Mention the purpose of istream class?
Write a program which uses functions like strcmp(), strcpy()? etc
What is a static element?
Explain operator overloading.
Can we sort map in c++?
What is the size of integer variable?
What is the difference between interpreters and compilers?
What are compilers in c++?
Explain the difference between abstract class and interface in c++?
What is the use of setfill in c++?
What is copy constructor? Can we make copy constructor private in c++?
Discuss the effects occur, after an exception thrown by a member function is unspecified by an exception specification?
What are 2 ways of exporting a function from a dll?
What are the benefits of c++?