I have an assignment to write an algorithm to print the first 10 odd numbers and this is my attempt
Initialize the first counter to 1 (i=1)
Initialize the second counter to 0 (j=0)
second counter is equal to second counter plus first counter(j=j+i)
print the value of the second counter (print j)
if second counter is greater than 10 (if j>10)
stop
else if j is less than 10 (j<10)
Add 2 to the value of the second counter (j=j+2)
print j
Repeat steps 4 to 9 until the value of second counter is greater than 10
Is it correct?