Visual Basic
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Tutorialized ForumsDesktop ProgrammingVisual Basic

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Tutorialized Forums Sponsor:
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  
Old November 9th, 2004, 12:27 PM
Pradeep Pradeep is offline
Junior Member
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Location: U.S.A
Posts: 4 Pradeep New User: is a brand new recruit and a unknown entity at this point. 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old November 15th, 2004, 04:33 PM
LLX LLX is offline
Senior Member
Tutorialized Newbie (0 - 499 posts)
 
Join Date: May 2004
Location: Glendale, CA
Posts: 285 LLX New User: is a brand new recruit and a unknown entity at this point. 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to LLX Send a message via MSN to LLX
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

Reply With Quote
  #3  
Old March 5th, 2008, 03:39 AM
hitesh hitesh is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Mar 2008
Posts: 2 hitesh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 m 14 sec
Reputation Power: 0
Arrow

Quote:
Originally Posted by Pradeep
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


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.

Reply With Quote
  #4  
Old March 5th, 2008, 03:41 AM
hitesh hitesh is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Mar 2008
Posts: 2 hitesh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 m 14 sec
Reputation Power: 0
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.

Reply With Quote
Reply

Viewing: Tutorialized ForumsDesktop ProgrammingVisual Basic > Program code to find reverse of a given number in COBOL


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway