home *** CD-ROM | disk | FTP | other *** search
/ 64'er 1993 March / 64er_Magazin_93-03_1993_Markt__Technik_de_Side_A.d64 / r-fakultaet (.txt) < prev    next >
Encoding:
Commodore BASIC  |  1993-01-01  |  343 b   |  11 lines

  1. 10 poke53281,0:poke53280,11:printchr$(30)chr$(142)
  2. 20 print:a=-1:poke198,0:input" fakultaet von ";a:ifa<0ora><int(a)then20
  3. 30 ti$="000000":t1=ti:f$=str$(a)+"! ="
  4. 40 c=1:print:ifa<34thenford=1toa:c=c*d:next:printf$c:goto100
  5. 60 b=1e30:ford=1toa:c=c*d:ifc>bthenc=c/b:e=e+30
  6. 70 next
  7. 80 ifc>10thenc=c/10:e=e+1:goto80
  8. 90 printf$str$(c)"e+"mid$(str$(e),2)
  9. 100 t2=ti:print:print(t2-t1)/60"sek. rechenzeit."
  10. 110 rem (c) 1992 by g. siegel
  11.