Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace TestGround
- {
- class Test
- {
- static void Main()
- {
- int count = 0;
- while (true)
- {
- try
- {
- int x = int.Parse(Console.ReadLine());
- count += 1;
- }
- catch (Exception)
- {
- Console.WriteLine(count);
- return;
- }
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment