Similar Posts

Subscribe
Notify of
4 Answers
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
tommy1T
1 year ago

Number = 0

repeat: as long as Number less than 101

Number+2

issued: number

you can do that!

Schachpapa
1 year ago

When you start with 0 and step by step up by 2 as long as you are under 101, the desired result should come out without a Modulo operator.

Recording all straight numbers up to 100 in the program itself is probably not what your teacher wants to see, but also the requirement.

Trilobit
1 year ago

Note 1: If you should issue a list of all natural numbers up to a million (no matter whether straight or odd), then would you also write all in a list and then issue the list?

Note 3: You can also add numbers other than 1;-)

PeterP58
1 year ago

$a = 0;

Bow (up to $a equal to 100)

Content of the loop: $a = $a + 2; Issue $a;