Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Array Loops Challenge | Arrays
C# Basics
course content

Conteúdo do Curso

C# Basics

C# Basics

1. Getting Started
2. Dealing with Data Types
3. Control Structures
4. Loops
5. Arrays
6. Methods

Array Loops Challenge

Loop through the numbers array and if the value of the element is even, add 1 to it, and if it's odd, multiply it by two. The original array should be modified.

cs

main

  1. All the numbers that give a remainder 0 when divided by 2 are called even numbers;
  2. Use the loop variable i to index and access the array elements.
cs

main

Tudo estava claro?

Seção 5. Capítulo 8
We're sorry to hear that something went wrong. What happened?
some-alt