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 the newline escape sequence?
What is the difference between variable declaration and variable definition in c?
What is operator promotion?
how to find anagram without using string functions using only loops in c programming
What is array of structure in c?
Is linux written in c?
What is anagram in c?
Do variables need to be initialized?
What do you mean by dynamic memory allocation in c?
Can we declare variables anywhere in c?
What is sizeof in c?
Is c language still used?
What are the 3 types of structures?
How do you write a program which produces its own source code as output?
How to declare a variable?