Write a program that takes a 5 digit number and calculates
2 power
that number and prints it.
Answer Posted / anusha
#include<stdio.h>
#include<conio.h>
main()
{
unsigned long integer n;
long integer res=1;
int i=1;
clrscr()
printf("please enter 5 digit no:");
scanf("%ld",&n);
for(i=1,i<=n,i++);
{
res=(res*2);
}
printf("Result is %ld",res);
getch();
}
| Is This Answer Correct ? | 7 Yes | 7 No |
Post New Answer View All Answers
What is far pointer in c?
Write a program to swap two numbers without using the third variable?
What is modeling?
Why malloc is faster than calloc?
How can I manipulate individual bits?
How to declare pointer variables?
what are enumerations in C
Can a program have two main functions?
What are local variables c?
What language is lisp written in?
How can I get random integers in a certain range?
what is the format specifier for printing a pointer value?
Which one would you prefer - a macro or a function?
What is a structural principle?
What is C language ?