Add Python notes
This commit is contained in:
21
python/функции/NOK.py
Executable file
21
python/функции/NOK.py
Executable file
@@ -0,0 +1,21 @@
|
||||
def nok (a,b):
|
||||
c=a
|
||||
d=b
|
||||
ia=1
|
||||
ib=1
|
||||
|
||||
while c != d:
|
||||
if c < d:
|
||||
ia += 1
|
||||
c = a*ia
|
||||
else:
|
||||
ib+=1
|
||||
d = b*ib
|
||||
|
||||
print(c, d)
|
||||
return c
|
||||
|
||||
z = int(input('a: '))
|
||||
x = int(input('b: '))
|
||||
nok(z, x)
|
||||
input()
|
||||
Reference in New Issue
Block a user