home *** CD-ROM | disk | FTP | other *** search
/ AMOS PD CD / amospdcd.iso / 601-625 / apd620 / amos_pro_only / division_using_mod.amos / division_using_mod.amosSourceCode
AMOS Source Code  |  1986-08-03  |  395b  |  29 lines

  1. Rem Division Using Only Integers And MOD.
  2.  
  3. ' note that numbers entered by user must 
  4. ' still be integer.
  5.  
  6. Input "Enter first number: ";A
  7. Input "Enter second number: ";B
  8.  
  9. Cls 
  10.  
  11. S$=""
  12.  
  13. S$=Str$(A/B)-Chr$(32)
  14.  
  15. S$=S$+"."
  16.  
  17. V=(A mod B)*10
  18.  
  19. S$=S$+Str$(V/B)-Chr$(32)
  20.  
  21. For N=1 To 3 : Rem change this to select no. of decimal places
  22.    
  23.    V=(V mod B)*10
  24.    
  25.    S$=S$+Str$(V/B)-Chr$(32)
  26.    
  27. Next 
  28.  
  29. Print S$