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



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

Answer / makthar basha

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

Is This Answer Correct ?    103 Yes 24 No

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

Answer / ashlesha

take no and define array take each letter n then use pow(no,2)

Is This Answer Correct ?    23 Yes 11 No

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

Answer / s.sivarajan

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

answer:

that question ask the exponential.
In the compute clause we use the ** for exponential
so write a program using this.

example:

IDENTIFICATION DIVISION.
PROGRAM-ID. SIVARAJAN.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 A PIC 9(10) VALUE 2.
01 B PIC 9(10) VALUE 12345.
01 EXP PIC 9(25).
PROCEDURE DIVISION.
START-PARA.
COMPUTE EXP=A**B.
DISPLAY EXP.
STOP RUN.

Is This Answer Correct ?    5 Yes 1 No

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

Answer / nikita

#include<stdio.h>
#include<math.h>
void main()
{
int a;
double c;
scanf("%5d",&a);
c=pow(a,2);
printf("%f",c);
}

Is This Answer Correct ?    5 Yes 3 No

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

Answer / amarnathreddy

take one array and that one initilize to n[10]=pow(no,2).
here no =given five digits no

Is This Answer Correct ?    2 Yes 2 No

Post New Answer

More C Interview Questions

If the static variable is declared as global, will it be same as extern?

1 Answers   Samsung,


what is the flow of execution in cprogram? ex:printf();,scanf();

2 Answers  


disply the following menu 1.Disply 2.Copy 3.Append; as per the menu do the file operations 4.Exit

0 Answers  


You have an int array with n elements and a structure with three int members. ie struct No { unsigned int no1; unsigned int no2; unsigned int no3; }; Point1.Lets say 1 byte in the array element is represented like this - 1st 3 bits from LSB is one number, next 2 bits are 2nd no and last 3 bits are 3rd no. Now write a function, struct No* ExtractNos(unsigned int *, int count) which extracts each byte from array and converts LSByte in the order mentioned in point1.and save it the structure no1, no2, no3. in the function struct No* ExtractNos(unsigned int *, int count), first parameter points to the base address of array and second parameter says the no of elements in the array. For example: if your array LSB is Hex F7 then result no1 = 7, no2 = 2, no3 = 7. In the same way convert all the elements from the array and save the result in array of structure.

2 Answers   Qualcomm,


What is pointer in c?

0 Answers  






In c programming, explain how do you insert quote characters (? And ?) Into the output screen?

0 Answers  


What is a program flowchart?

0 Answers  


What is the deal on sprintf_s return value?

0 Answers  


What is a wrapper function in c?

0 Answers  


What is an lvalue?

0 Answers  


what are the program that using a two dimensional array that list the odd numbers and even numbers separately in a given 10 inputs values

0 Answers   College School Exams Tests,


What does the message "warning: macro replacement within a string literal" mean?

1 Answers  


Categories