Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _12._11._19trith
- {
- class Program
- {
- static void Main(string[] args)
- {
- string doseArithmo;
- int arithmos;
- int count = 0;
- Console.WriteLine(" dwse arithmo ");
- doseArithmo = Console.ReadLine();
- arithmos = int.Parse(doseArithmo);
- for (int i = 2; i < arithmos; i++)
- {
- if( arithmos % i == 0)
- {
- count = count + 1;
- }
- }
- if ( count < 1)
- {
- Console.WriteLine(" O ARITHMOS {0} EINAI PROTOS", arithmos);
- }
- else
- {
- Console.WriteLine("O ARITHMOS EINAI {0} DEN EINAI PROTOS", arithmos );
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement