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


Please Help Members By Posting Answers For Below Questions

What is a constant reference?

612


What is exception handling? Does c++ support exception handling?

583


Do you know what are static and dynamic type checking?

612


Difference between pass by value and pass by reference?

593


What is c++ iterator?

633






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?

584


What return value must conversion operators have in their declaration?

607


What is the average salary of a c++ programmer?

534


What is the use of function pointer?

568


What header file is needed for exit(); a) stdlib.h b) conio.h c) dos.h

602


When can I use a forward declaration?

618


Can we distribute function templates and class templates in object libraries?

583


What is operators in c++?

561


If a function doesn’t return a value, how do you declare the function?

610


What is the equivalent of Pascal's Real a) unsigned int b) float c) char

580