skipter icon

C# Fundamentals - Count of Integers

skipter | PRO | 06/03/17 05:23:02 AM UTC | 0 ⭐ | 293 👁️ | Never ⏰ | []
C# |

630 B

|

None

|

0 👍

/

0 👎

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp9
{
    class Program
    {
        static void Main(string[] args)
        {
 
            int integers = 0;
            int counter = 0;
            try
            {
                while ((int) integers == (int) integers)
                {
                    integers = int.Parse(Console.ReadLine());
                    counter++;
                }
            } catch (Exception ex)
            {
                Console.WriteLine(counter);
            }        
        }
    }
}

Comments