написать программу выводящую числа в диапазоне от 100 до 1001 и посчитать их сумму в c#​

Ответы

Ответ дал: VadimBro85
0

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text.RegularExpressions;

namespace Rextester

{

   public class Program

   {

       public static void Main(string[] args)

       {

           int sum = 0;

           

           for (int i = 100; i <= 1001; i++)

           {

               Console.WriteLine(i);

               sum += i;

           }

           Console.WriteLine("Sum = {0}", sum);

       }

   }

}

Вас заинтересует