|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Program code to find reverse of a given number in COBOL
hello every body
i am developing a small application in COBOL i have to get a reverse of given 3 digit number please reply me if you know the code or mail me to URL
__________________
Hello friends this is pradeep . i am graduate from Ohio state university |
|
#2
|
|||
|
|||
|
this would be relitivly simple in php dunno cobal
but this might help youd want to Exlode/slipt the number into 3 values value array[0] 1 and 2. Then just implote them in the order 2,1,0
__________________
24y-CW, 8y-HTML, 5y-PS, 8m-PHP And I never knew Photoshop could do HTML! You learn something every day. http://lexxboard.lurkerlordx.com/listcatagories.php |
|
#3
|
|||
|
|||
|
Quote:
hi pradeep this is the program in cobol in which u can reverse the number taking three digits IDENTIFICATION DIVISION. PROGRAM-ID. EXAMPLE1. DATA DIVISION. WORKING-STORAGE SECTION. 01 NUM1 PIC 999 VALUE ZEROS. 01 NUM2 PIC 9 VALUE ZEROS. 01 NUM3 PIC 99 VALUE 10. 01 RESULT PIC 999 VALUE ZEROS. 01 TEMP PIC 99. PROCEDURE DIVISION. CALCULATOR. DISPLAY "ENTER FIRST NUMBER :". ACCEPT NUM1. PERFORM UNTIL NUM1 = 0 DIVIDE NUM1 BY NUM3 GIVING TEMP REMAINDER NUM2 COMPUTE RESULT =(RESULT * NUM3) + NUM2 COMPUTE NUM1 = NUM1 / NUM3 END-PERFORM DISPLAY "RESULT IS=", RESULT. STOP RUN. |
|
#4
|
|||
|
|||
|
code to reverse the no in cobol
Identification Division.
Program-id. Example1. Data Division. Working-storage Section. 01 Num1 Pic 999 Value Zeros. 01 Num2 Pic 9 Value Zeros. 01 Num3 Pic 99 Value 10. 01 Result Pic 999 Value Zeros. 01 Temp Pic 99. Procedure Division. Calculator. Display "enter First Number :". Accept Num1. Perform Until Num1 = 0 Divide Num1 By Num3 Giving Temp Remainder Num2 Compute Result =(result * Num3) + Num2 Compute Num1 = Num1 / Num3 End-perform Display "result Is=", Result. Stop Run. |
![]() |
| Viewing: Tutorialized Forums > Desktop Programming > Visual Basic > Program code to find reverse of a given number in COBOL |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|