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 is infinite loop?
What are run-time errors?
What are the disadvantages of a shell structure?
c program to compute AREA under integral
Why should I prototype a function?
What are the salient features of c languages?
Function calling procedures? and their differences? Why should one go for Call by Reference?
Sir i need notes for structure,functions,pointers in c language can you help me please
Can two or more operators such as and be combined in a single line of program code?
What is the importance of c in your views?
What are the preprocessor categories?
What is null pointer in c?
FILE PROGRAMMING
Explain how do you print only part of a string?
Why c is a procedural language?