4) Write a program that takes a 5 digit number and
calculates 2 power
that number and prints it.
Answers were Sorted based on User's Feedback
Answer / deepshree sinha
#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
int n,m
printf("enter any five digit number");
scanf("%d ",&n);
m=pow(2,n);
printf("m=%d",m);
getch();
}
| Is This Answer Correct ? | 5 Yes | 4 No |
Answer / nitish kumar choudhary
u have to define int as long unsigned int to increase its
size..
normally int cant give u the answer.
void main()
{
long unsigned int res;
int a;
printf("Enter the 5 digit no.: ");
scanf("%d" ,&a);
printf("result is: %uL", a*a);
getch();
}
| Is This Answer Correct ? | 3 Yes | 6 No |
Answer / sathishmani
#include<stdio.h>
#include<conio.h>
void main()
{
int a;
a=12345;
printf("\n The Result is ",a*a);
getch();
}
| Is This Answer Correct ? | 6 Yes | 18 No |
can you change name of main()?how?
Which are low level languages?
write a c program to find largest of three numbers using simple if only for one time.
Describe for loop and write a c program to sum the series X + x2/2! + x3 /3! + …….. up to fifteen terms.
What are the characteristics of arrays in c?
What is the use of getchar functions?
HOW TO HANDLE EXCEPTIONS IN C
What is file in c language?
What is function in c with example?
How is null defined in c?
What are the types of variables in c?
How many levels of pointers have?