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
Which operators cannot be overloaded a) Sizeof b) .* c) :: d) all of the above
What is typedf?
What are the main characteristics of c language describe the structure of ac program?
What is the use of typedef in c?
What is the difference between struct and union in C?
What is external variable in c?
What are the different types of errors?
How macro execution is faster than function ?
How do you redirect a standard stream?
Is it fine to write void main () or main () in c?
What is a structure and why it is used?
Dont ansi function prototypes render lint obsolete?
What are run-time errors?
Explain what standard functions are available to manipulate strings?
What are register variables? What are the advantage of using register variables?