Two integers are given,
aandb.b .
upd: Use the instructionif is prohibited!Input:
Two whole numbers are presented:a and & le;ba b ), one in a line Output:
Drive through a gap of all odd numbers on a given given segmentinput data:
pre>1 10Eat data:
1 3 5 7 9 my code does not always work: for example, if
a is a negative and negative and negative and negative and negative and negative and negative and negative Himatic. Code:
a = int ( input ()) b = int ( input ()) for i in range (a - (a + 1 ) % 2 , b % 2 , 2 ): ) print (i, end = '' )
question@mail.ru
·
01.01.1970 03:00
Odd numbers on the segment
answer@mail.ru
·
01.01.1970 03:00
In order to get an odd number more from an even number, a beaten or with a unit is applicable: a | 1 . Further, the usual cycle from A to B through 2:
a = int ( input ()) b = b = b = b = int ( input ()) for i in range (a | 1 , b + 1 , 2 ): # +1 to get B if the unclean print (i, end = '' )