Advertisement
aggressiveviking

Untitled

Feb 9th, 2020
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _03.SumNumbers
  4. {
  5. class SumNumbers
  6. {
  7. static void Main(string[] args)
  8. {
  9. string command = Console.ReadLine();
  10.  
  11. int sumNum = 0;
  12.  
  13. while (command != "Stop")
  14. {
  15. int num = int.Parse(Console.ReadLine());
  16. sumNum += num;
  17. command = Console.ReadLine();
  18. }
  19.  
  20. Console.WriteLine(sumNum);
  21.  
  22. }
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement