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
How many namespaces are there in c++?
Is atoi safe?
What are references in c++?
Show the declaration for a static member variable.
What is the arrow operator in c++?
Can c++ be faster than c?
What's the order in which the objects in an array are destructed?
What are static variables?
What are the differences between java and c++?
What is dev c++ used for?
What is namespace std; and what is consists of?
Does a derived class inherit or doesn't inherit?
Where can I run c++ program?
Mention the ways in which parameterized can be invoked.
What is std :: flush?