Back to Freecodecamp

Iterate Through a Code Block Using the for Statement in C#

curriculum/challenges/english/blocks/add-logic-to-c-sharp-console-applications/647e218f8acb466c97ccbee5.md

latest1.1 KB
Original Source

--description--

This challenge will be partially completed on the Microsoft Learn platform. Follow these instructions to complete the challenge:

  1. Go to <a href="https://learn.microsoft.com/training/modules/csharp-for/" target="_blank" rel="noreferrer">https://learn.microsoft.com/training/modules/csharp-for/</a> and complete all the tasks for the "Iterate Through a Code Block Using the for Statement in C#" module. This is required to earn the "Add Logic to C# Console Applications" trophy on Microsoft Learn, and qualify for the certification exam.
  2. When you are finished, come back and correctly answer the question below.

--assignment--

Complete the <a href="https://learn.microsoft.com/training/modules/csharp-for/" target="_blank" rel="noreferrer">Iterate Through a Code Block Using the for Statement in C#</a> module on Microsoft Learn. Then, answer the question below.

--questions--

--text--

Which of the following for statements is correct?

--answers--

for (int x = 20: x < 80: x++)


for (int j = 0; j == 80; j + 1)


for (int counter = 20; counter < 80; counter++)

--video-solution--

3