Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Which operators cannot be overloaded a) Sizeof b) .* c) :: d) all of the above

1139


What is typedf?

1124


What are the main characteristics of c language describe the structure of ac program?

1211


What is the use of typedef in c?

1030


What is the difference between struct and union in C?

1306


What is external variable in c?

1059


What are the different types of errors?

1138


How macro execution is faster than function ?

1183


How do you redirect a standard stream?

1104


Is it fine to write void main () or main () in c?

1025


What is a structure and why it is used?

1220


Dont ansi function prototypes render lint obsolete?

1124


What are run-time errors?

1118


Explain what standard functions are available to manipulate strings?

1076


What are register variables? What are the advantage of using register variables?

1187