repl.it
@EduardoYasuda1/

Banknotes

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
x = int(input())
notas = [100, 50, 20, 10, 5, 2, 1]
y = 0
print(x)
for num in notas:
    if x >= num:
        while x >= num:
            x = x -num
            y = y + 1
        print (y, " nota(s) de R$ ", num, ",00", sep='')
        y = 0
    else:
        print (y, " nota(s) de R$ ", num, ",00", sep='')