Write a program that takes a 5 digit number and calculates
2 power that number and prints it

Answer Posted / nikita

#include<stdio.h>
#include<math.h>
void main()
{
int a;
double c;
scanf("%5d",&a);
c=pow(a,2);
printf("%f",c);
}

Is This Answer Correct ?    5 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of scanf() and printf() functions?

729


Is c call by value?

621


What is static identifier?

712


What does %d do in c?

554


What is the difference between text and binary modes?

656






What is wrong with this program statement? void = 10;

832


What is the difference between void main and main in c?

638


i have to apply for rbi before that i need to know the the syllabus for the entrance questions. whethet it may be aps or techinical

1850


Why do we need a structure?

603


What is the difference between the local variable and global variable in c?

540


How do c compilers work?

621


Is it fine to write void main () or main () in c?

559


hi folks i m approching for h1 b interview on monday 8th of august at montreal and i m having little problem in my approval notice abt my bithdate my employer has made a mistake while applying it is 12th january and istead of that he had done 18 the of january do any body have any solution for that if yes how can i prove my visa officer abt my real birthdate it urgent please let me know guys thaks dipesh patel

1422


Why is sizeof () an operator and not a function?

599


hai iam working in sap sd module for one year and working in lumax ind ltd in desp department but my problem is i have done m.b.a in hr/marketing and working sap sd there is any combination it. can you give right solution of my problem. and what can i do?

1676