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 a class template?
what is a reference variable in C++?
If you don’t declare a return value, what type of return value is assumed?
What is the use of ::(scope resolution operator)?
What is null pointer and void pointer?
Write a program in c++ to print the numbers from n to n2 except 5 and its multiples
Can comments be longer than one line?
Explain the advantages of using friend classes.
What is vector string in c++?
Is c++ faster than c?
How is data hiding achieved in c++?
Describe the setting up of my member functions to avoid overriding by the derived class?
What parameter does the constructor to an ofstream object take?
which operator is used for performing an exponential operation a) > b) ^ c) none
What is c++ coding?