using System;
namespace для_знаний_ком
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Задайте значение переменной 'a' с клавиатуры "); string a = Console.ReadLine(); int x = Convert.ToInt32(a);
int s = 0;
do
{
s += x;
x++;
}
while (x < 500);
Console.WriteLine($"Сумма всех чисел от {a} до 500 = {s}");
}
}
}
Примечание:Табуляции на скриншоте ↓