lab9.cs 588 B

123456789101112131415161718192021222324
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace lab_9
  7. {
  8. class Program
  9. {
  10. static void Main(string[] args)
  11. {
  12. int num;
  13. Console.W riteLine ("Введите число заканчивающиеся нулём") ;//надпись
  14. for (sum = 0; int.TryParse(Console.ReadLine(), out int n); sum += n)
  15. Console.WriteLine ($"Сумма введёных чисе л:{sum}");
  16. Console.ReadKey();
  17. }
  18. }
  19. }