Write a program that takes a 5 digit number and calculates
2 power that number and prints it
Answer Posted / 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 |
Post New Answer View All Answers
What are different storage class specifiers in c?
Explain the use of fflush() function?
In c programming typeing to occupy the variables in memory space. if not useing the variable the memory space is wasted.ok, how to avoid the situation..? (the variable is used & notused)
What is a void * in c?
What is pragma in c?
What is null character in c?
What is the correct code to have following output in c using nested for loop?
When I tried to go into a security sites I am denied access and a message appeared saying 'applet not initialize'. How can I rectify this problem.
Explain how can you avoid including a header more than once?
What is console in c language?
Is register a keyword in c?
write a c program in such a way that if we enter the today date the output should be next day's date.
what do you mean by inline function in C?
What is the c value paradox and how is it explained?
What is array in c with example?