Write a suitable program which outputs all the multiples of 3 up to 50 to the console. Use either a
A hamster starts at the coordinate (0,0) and moves around in the following fashion:
Write a suitable program which outputs all the prime numbers between 1 and 300. You will need a way to determine whether each number you consider is prime.
The Euclidean Algorithm is a well known technique to find the Higher Common Factor of two numbers. For two numbers
xis 0 then stop and output
y, and vice versa.
xis divided by
y. For examlpe, when 30 is divided by 4, the quotient is 7 and the remainder is 2.
yequal to this remainder, then go back to Step 1.