MuffinMonster

Class Task 24#

Oct 28th, 2013
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.59 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace ConsoleApplication3
  7. {
  8.     class Program
  9.     {
  10.         static void Main(string[] args)
  11.         {
  12.             int num = int.Parse(Console.ReadLine());
  13.             bool rishoni = true;
  14.             for (int i = 2; i < num / 2; i++)
  15.             {
  16.                 if (num % i == 0) rishoni = false;
  17.             }
  18.             if (rishoni == false) Console.WriteLine("Parik!");
  19.             else
  20.                 Console.WriteLine("Rishoni!");
  21.             Console.Read();
  22.         }
  23.     }
  24. }
Add Comment
Please, Sign In to add comment