Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Count_the_Integers
- {
- class Count_the_Integers
- {
- static void Main(string[] args)
- {
- int count = 0;
- int number;
- bool result = true;
- while (result)
- {
- result = int.TryParse(Console.ReadLine(), out number);
- if (result) count++;
- }
- Console.WriteLine(count);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement