using System;
public class Calculator
{
// Q5. Write a Class Calculator. Inside class calculator create a method PrimeChecker which returns a bool value. PrimeChecker has one int parameter. It checks if the input parameter is prime or not and returns true if its prime otherwise returns false. Call the method PrimeChecker in Main method, Print the value returned by Method PrimeChecker .
public bool PrimeChecker(int num)
int count = 0;
for (int i = 1; i <= num; i++)
if (num % i == 0)
count++;
}
if (count == 2)
return true;
else
return false;
public class Program
public static void Main()
int num = Int32.Parse(Console.ReadLine());
Calculator calc = new Calculator();
bool number = (calc.PrimeChecker(num));
Console.WriteLine(number);