windowtitle "Neuer Euklid (uses Modulo-function)" proc ggT : parameters a&,b& var c&=0 if a&<b& :c&=a&:a&=b&:b&=c&: endif case a&=0:return b& while b&<>0: c&=a& mod b&:a&=b&:b&=c& endwhile:return a& endproc declare a&,b&,ggt& While 1:cls:set("decimals",0):print print " Please only Ganzzahlen To 2147483647" print:print " counter = ";:input a&:case a&=0:end print " denominator = ";:input b&:case b&=0:end ggT&=ggT(a&,b&):print " ggT(";a&;",";b&;")= ";ggT& print: if b&/ggt&>1 :print " fraction: ";a&/ggt&;"/";b&/ggt& case a&>b&:print " or.",a&\b&;"<";(a& mod b&)/ggt&;"/";b&/ggt&;">" else:print " Result: ";a&/ggt&;:endif WaitInput endwhile End
Session-Cookies