예제 #1
0
파일: oving 5 3.py 프로젝트: BP---/ITGK
from BPfunctions import gcd, ReduceFraction, InputCheck

go = 'y'
while go != 'n':
    a = InputCheck('int', 'Skriv inn et tall', 'Ikke et heltall, prøv igjen')
    b = InputCheck('int', 'Skriv inn et tall', 'Ikke et heltall, prøv igjen')
    print(gcd(a,b))
    a, b = ReduceFraction(a,b)
    print(int(a),'/',int(b), sep='')
    go = input('skriv n for å avslutte')


    
예제 #2
0
from BPfunctions import gcd, lcm

print(gcd(1001,1331))
print(lcm(25,15))