165k views
0 votes
Someone help me I don’t know what to do /COMPUTER SCIENCE

Someone help me I don’t know what to do /COMPUTER SCIENCE-example-1

1 Answer

4 votes
It kind of depends on the intended language, but I can see the following mistakes:

- lines not terminated with a semicolon (but not all languages require this)
- while statement missing parenthesis, ie., while (num1 <= num2), also not required in all languages
- statements below the while statement must be grouped by curly braces
- num1+5 should be num1=num1+5 or num1 += 5

Output will be:

10
15
20
25
30
User Loqman
by
7.2k points