C# Fundamentals - Count of Integers
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