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 ? | 2 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 |
Is it possible to run using programming C for Java Application?
What is uint8 in c?
write the program for maximum of the following numbers? 122,198,290,71,143,325,98
Write a program to print distinct words in an input along with their count in input in decreasing order of their count..
What is a program flowchart and how does it help in writing a program?
Write the program with at least two functions to solve the following problem. The members of the board of a small university are considering voting for a pay increase for their 5 faculty members. They are considering a pay increase of 8%. Write a program that will prompt for and accept the current salary for each of the faculty members, then calculate and display their individual pay increases. At the end of the program, print the total faculty payroll before and after the pay increase, and the total pay increase involved.
Why malloc is faster than calloc?
Why is conio.h not required when we save a file as .c and use clrscr() or getch() ?
who will call your main function in c under linux?
write a program in c language that uses function to locate and return the smallest and largest integers in an array,number and their position in the array. it should also find and return the range of the numbers , that is , the difference between the largest number and the smallest.
what is the use of operator ^ in C ? and how it works?
write a program structure to find average of given number