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 the use of object in c++?
What is a wchar_t in c++?
On throwing an exception by the animal constructor in p = new animalq, can memory leak occur?
Is rust better than c++?
True or false, if you keep incrementing a variable, it will become negative a) True b) False c) It depends
What does namespace mean in c++?
What are c++ manipulators?
Is java the same as c++?
What is the best ide for c++?
What is encapsulation in c++ with example?
How do I get good at c++ programming?
What does ctime() do?
what kind of projects are suitable for c and c++
What is a class definition?
Define private, protected and public access control.