Guest User

Untitled

a guest
May 25th, 2017
460
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. using System;
  2.  
  3. namespace SimpleProblems
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9.  
  10. int numberInt = 0;
  11. try
  12. {
  13. while (true)
  14. {
  15. var input = int.Parse(Console.ReadLine());
  16. numberInt++;
  17. }
  18.  
  19. }
  20. catch (FormatException)
  21. {
  22. Console.WriteLine(numberInt);
  23. }
  24. }
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment