Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n = int(input('Введите число: '))
- a = int(input('Введите цифру: '))
- b = int(input('Введите цифру: '))
- l = []
- с = n
- while с > 0:
- l += [с%10]
- с = с//10
- i = 0
- while i < len(l):
- if l[i] == a:
- print ('цифра а присутствует')
- else:
- print ('нет')
- i += 1
- j = 0
- while j < len(l):
- if l[j] == b:
- print ('цифра b присутствует')
- else:
- print ('нет')
- j += 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement