I have this program to solve within the resolution I have a loop while
infinite and I do not know how to put it, because if I use a break
I leave the funcion
and I can not continue entering data to my program.
It has to be verified with the following example:
-
Input | Result
-
6 | Value 1 = 6; multiple of 3
- 10 | Value 2 = 10;
-
6 | Value 3 = -6; multiple of 3
-
10 | Value 4 = -10;
-
0 | END: 2 multiples of 3
m=int(raw_input(""))
t=0
pares=0
while m>=0:
t=t+1
if m%2==0:
pares=pares+1
l="par"
else:
l="impar"
print "Valor",t,"=",m,";",l