Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _03.SumNumbers
- {
- class SumNumbers
- {
- static void Main(string[] args)
- {
- string command = Console.ReadLine();
- int sumNum = 0;
- while (command != "Stop")
- {
- int num = int.Parse(Console.ReadLine());
- sumNum += num;
- command = Console.ReadLine();
- }
- Console.WriteLine(sumNum);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement