test1
This commit is contained in:
11
operators_20.py
Normal file
11
operators_20.py
Normal file
@@ -0,0 +1,11 @@
|
||||
n = int(input("Введите число n: "))
|
||||
|
||||
for num in range(100, 1000):
|
||||
|
||||
digit1 = num // 100
|
||||
digit2 = (num // 10) % 10
|
||||
digit3 = num % 10
|
||||
|
||||
if digit1 + digit2 + digit3 == n:
|
||||
print(num, end=" ")
|
||||
print()
|
||||
Reference in New Issue
Block a user