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 are manipulators in c++ with example?
Why c++ is so important?
What are signs of manipulation?
Describe the process of creation and destruction of a derived class object?
What is copy constructor? Can we make copy constructor private in c++?
What is runtime polymorphism in c++?
How is modularity introduced in C++?
What is a storage class? Mention the storage classes in c++.
How can you quickly find the number of elements stored in a dynamic array? Why is it difficult to store linked list in an array?
How many types of classes are there in c++?
What is atoi in c++?
What is binary search in c++?
How does a copy constructor differs from an overloaded assignment operator?
How does the copy constructor differ from the assignment operator (=)?
What is the use of bit fields in structure declaration?