Write a program that takes a 5 digit number and calculates
2 power that number and prints it(should not use big
integers and exponential functions)
Answer Posted / nitin katakdound
int main(int argc, char *argv)
{
long two_power, five_digit_number;
if(scanf("%ld",&five_digit_number)){
two_power = five_digit_number*five_digit_number;}
printf("\n 2 power of that number is %ld",two_power);
return 0;
}
Is This Answer Correct ? | 13 Yes | 29 No |
Post New Answer View All Answers
Given below are three different ways to print the character for ASCII code 88. Which is the correct way1) char c = 88; cout << c << " ";2) cout.put(88);3) cout << char(88) << " "; a) 1 b) 2 c) 3 d) constant
What is c variable?
What is #include stdio h?
Why are algorithms important in c program?
swap 2 numbers without using third variable?
Why is c called a structured programming language?
I need a sort of an approximate strcmp routine?
Why is C language being considered a middle level language?
How to create struct variables?
What are the general description for loop statement and available loop types in c?
What is a macro?
can we implement multi-threads in c.
What is a char in c?
What is the difference between far and near ?
any "C" function by default returns an a) int value b) float value c) char value d) a & b