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 / sushant shrivastava
include<math.h>
include<stdio.h>
int main()
{
int i,num;
printf("Enter the value of i");
scanf("%d",&i)
num=POW(i,2);
printf("%d%d",num);
}
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / 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 |
Answer / usha
#include<stdio.h>
void main()
{
unsigned long int s=1;
int n;
scanf("%d%d",&n);
for(int i=0; i<n; i++)
{
s=s*2;
}
printf("result %ld",s);
getch();
}
| Is This Answer Correct ? | 1 Yes | 3 No |
Answer / akshay
#include<stdio.h>
#include<conio.h>
//Develo0ed by Akshay p.Joy
void main()
{
unsigned long int a,s=1;
int i,j,k,l,m,n;
scanf("%d%d",&m);
for(i=0;i<2;++i)
{
s=s*m;
}
printf("result %ld",s);
getch();
}
| Is This Answer Correct ? | 5 Yes | 11 No |
write a c program to check weather a particluar bit is set or not?
The variables are int sum=10,SuM=20; these are same or different?
A text file that contains declarations used by a group of functions,programs,or users a) executable file b) header file c) obj file d) .cfile
How to explain the final year project as a fresher please answer with sample project
what is computer engg
What is structure and union in c?
write a program that types this pattern: 12345678987654321 12345678 87654321 1234567 7654321 123456 654321 12345 54321 1234 4321 123 321 12 21 1 1
Write a program to write a given string in maximum possibilities? i.e str[5]="reddy"; i.e we can write this string in 120 ways for that write a program
Are the outer parentheses in return statements really optional?
Add Two Numbers Without Using the Addition Operator
How would you use the functions fseek(), freed(), fwrite() and ftell()?
0 Answers Aspire, Infogain, TISL,
What are header files and what are its uses in C programming?