Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Write a program that takes a 5 digit number and calculates
2 power
that number and prints it.

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the difference between the local variable and global variable in c?

1133


to find the closest pair

2370


Explain what is the best way to comment out a section of code that contains comments?

1188


How do you sort filenames in a directory?

1236


What is difference between scanf and gets?

1371


What is the difference between printf and scanf in c?

1428


What is return in c programming?

1021


What is the purpose of & in scanf?

1121


Why dont c comments nest?

1110


Why is c called a structured programming language?

1333


largest Of three Number using without if condition?

1666


What are the 4 types of unions?

1089


How can I implement sets or arrays of bits?

1092


main() { inta=10,b=20; a>=5?b=100:b=200; printf("%d ",b); }

1644


What is the best style for code layout in c?

1143