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 constant reference?
What is exception handling? Does c++ support exception handling?
Do you know what are static and dynamic type checking?
Difference between pass by value and pass by reference?
What is c++ iterator?
If a base class is an adt, and it has three pure virtual functions, how many of these functions must be overridden in its derived classes?
What return value must conversion operators have in their declaration?
What is the average salary of a c++ programmer?
What is the use of function pointer?
What header file is needed for exit(); a) stdlib.h b) conio.h c) dos.h
When can I use a forward declaration?
Can we distribute function templates and class templates in object libraries?
What is operators in c++?
If a function doesn’t return a value, how do you declare the function?
What is the equivalent of Pascal's Real a) unsigned int b) float c) char