123456789101112131415161718192021222324 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace lab_9
- {
- class Program
- {
- static void Main(string[] args)
- {
- int num;
- Console.W riteLine ("Введите число заканчивающиеся нулём") ;//надпись
- for (sum = 0; int.TryParse(Console.ReadLine(), out int n); sum += n)
- Console.WriteLine ($"Сумма введёных чисе л:{sum}");
- Console.ReadKey();
- }
- }
- }
|