2.10 - Odd numbers, descending

Objetive

Create a program to display on the screen the odd numbers from 15 to 7 (downwards), using "while".

Solution

using System;
public class Exercise026
{
    public static void Main()
    {
        int n = 15;
 
        while (n >= 7)
        {
            Console.WriteLine(n);
            n -= 2;
        }
    }
 }

Popular Posts