Section 1. Chapter 66
single
Challenge: Printing a Sequence
Swipe to show menu
Task
Swipe to start coding
Write a program that generates the first ten even numbers.
Follow these loop parameters exactly:
- Initialization: start
iat1. - Condition: continue while
i <= 10. - Update: increase
iby1each iteration.
Inside the loop:
- Multiply
i * 2. - Store the result in an array.
- Return the full sequence.
Solution
Everything was clear?
Thanks for your feedback!
Section 1. Chapter 66
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat