last lab
This commit is contained in:
6
labPython/lab4/Reccur2.py
Executable file
6
labPython/lab4/Reccur2.py
Executable file
@@ -0,0 +1,6 @@
|
||||
def maxNum(num_end:int) -> int:
|
||||
if num_end < 1:
|
||||
return 0
|
||||
else:
|
||||
return num_end%10 + maxNum(num_end//10)
|
||||
print(maxNum(0))
|
||||
Reference in New Issue
Block a user