Untitled
unknown
python
2 years ago
386 B
9
Indexable
numeros = []
for i in range(10):
num = int(input())
numeros.append(num)
quantidade_negativos = 0
soma_positivos = 0
for num in numeros:
if num < 0:
quantidade_negativos += 1
elif num > 0:
soma_positivos += num
print("Quantidade de números negativos:", quantidade_negativos)
print("Soma dos números positivos:", soma_positivos)
Editor is loading...
Leave a Comment