Write a program that uses a while loop to calculate and print the multiples of 3 from 3 to 21. Your program should print each number on a separate line.
first_element=3
multiple_step=3
last_element=21
intermediate_element=3
while intermediate_element <= 21 :
print(intermediate_element)
intermediate_element=intermediate_element+multiple_step
Comments
Leave a comment