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
Define Array of pointers.
How is a structure member accessed?
What is the difference between memcpy and memmove?
List the difference between a While & Do While loops?
Explain what is page thrashing?
Explain the ternary tree?
a) Identify the following declarations. Ex. int i (integer variable) float a[l0](array of 10 real nos) int (*f())() void *f int (*f()) [] void *f int f[] [] [] char *(*f) () int (*f[]) [] float(*f) [] [] float **f int ******f
Where are local variables stored in c?
What is a example of a variable?
How can you call a function, given its name as a string?
Can we access the array using a pointer in c language?
What is function in c with example?
What is #define?
What do you mean by c what are the main characteristics of c language?
Explain c preprocessor?