daily pastebin goal
40%
SHARE
TWEET

Untitled

a guest Jan 29th, 2018 38 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.  
  3. namespace ConsoleApp3
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int count = 0;
  10.  
  11.             while (true)
  12.             {
  13.                 try
  14.                 {
  15.                     int num = int.Parse(Console.ReadLine());
  16.                     count++;
  17.                 }
  18.                 catch (Exception)
  19.                 {
  20.  
  21.                     Console.WriteLine(count);
  22.                     return;
  23.                 }
  24.             }
  25.         }
  26.     }
  27. }
RAW Paste Data
Pastebin PRO WINTER Special!
Get 40% OFF Pastebin PRO accounts!
Top