Facebook
From Blush Armadillo, 3 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 128
  1. using System;
  2.  
  3. namespace ConsoleApp5
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             bool czy_pierwsza;
  10.             int n;
  11.             Console.WriteLine("Ile sprawdzeń mam wykonać?");
  12.             int ile_spr = int.Parse(Console.ReadLine());
  13.             Console.WriteLine("Podaj liczbe");
  14.              n = int.Parse(Console.ReadLine());
  15.  
  16.  
  17.  
  18.             for (int i = 2; i * i <= n; i++)
  19.             {
  20.                 if (n % i == 0)
  21.                 {
  22.                     Console.WriteLine("Nie" +  " "+"Koniec");
  23.                 }
  24.             }
  25.  
  26.  
  27.  
  28.  
  29.             if (ile_spr < 2)
  30.             {
  31.                
  32.                 Console.WriteLine("Tak"+"  "+"Koniec");
  33.             }
  34.  
  35.  
  36.  
  37.            
  38.         }
  39.     }
  40. }
  41.