68.4k views
0 votes
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.

User Roi Divon
by
4.8k points

1 Answer

2 votes

i = 3

while i <= 21:

if i % 3 == 0:

print(i)

i += 1

User Ofer Segev
by
4.8k points