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

How many namespaces are there in c++?

556


Is atoi safe?

591


What are references in c++?

652


Show the declaration for a static member variable.

522


What is the arrow operator in c++?

556






Can c++ be faster than c?

597


What's the order in which the objects in an array are destructed?

849


What are static variables?

615


What are the differences between java and c++?

528


What is dev c++ used for?

603


What is namespace std; and what is consists of?

662


Does a derived class inherit or doesn't inherit?

615


Where can I run c++ program?

597


Mention the ways in which parameterized can be invoked.

534


What is std :: flush?

573