namespace ClassLibrary1
{
public class Class1
{
public static void Main()
{
Console.WriteLine("Enter the integer number");
int n = Convert.ToInt32(Console.ReadLine());
int forprint = n;
int reaminder;
int noOfZeros;
int totNoZeros = 0;
while (n != 0)
{
noOfZeros = 0;
reaminder = n % 10;
switch (reaminder)
{
case 0:
noOfZeros = 1;
break;
case 6:
noOfZeros = 1;
break;
case 8:
noOfZeros = 2;
break;
// case 4: noOfZeros = 1; break; Ignore 4
case 9:
noOfZeros = 1;
break;
}
totNoZeros = totNoZeros + noOfZeros;
n = n / 10;
}
Console.WriteLine("The no is : {0} and no circle's : {1}", forprint, totNoZeros);
Console.ReadLine();
}
}
}This code snippet for Counting the Circle's in the Given Number.
