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 |
What is a sequential access file?
How many levels of pointers have?
Do you know the use of 'auto' keyword?
What are pointers? What are different types of pointers?
Can I initialize unions?
what is the syallabus of computer science students in group- 1?
a=(1,2,3); b=1,2,3; c=1,(2,3); d=(1,2),3; what's the value of 'a','b','c','d'
Write an algorithm for a program that receives an integer as input and outputs the product of of its digits. E.g. 1234 = 24, 705 = 0
What is data types?
What are the ways to a null pointer can use in c programming language?
while initialization of array why we use a[][2] why not a[2][]...?
#include<stdio.h> main(0 { printf("\n %d %d %d",sizeof(3),sizeof("3"),sizeof(3)); }