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
Is c++ vector a linked list?
What are c++ templates used for?
Implement stack operations with pointers with appropriate exception checks.
How do you define a class in c++?
What is a syntax in c++?
Are iterators pointers?
Should the this pointer can be used in the constructor?
Can you write a function similar to printf()?
what are Operators and explain with an example?
Why the usage of pointers in C++ is not recommended ?
What are namespaces in c++?
What is the difference between while and do while loop? Explain with examples.
Does c++ have finally?
What jobs can you get with a c++ certification?
Difference between pointer to constant vs. Pointer constant