Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Simple_code
- {
- class Program
- {
- static void Main(string[] args)
- {
- while (true)
- {
- Console.WriteLine("Введите число: ");
- int num = int.Parse(Console.ReadLine());
- if (num % 100 >= 11 && num % 100 <= 14)
- {
- Console.WriteLine($"{num} программистов");
- }
- else if (num % 10 >= 2 && num % 10 <= 4)
- {
- Console.WriteLine($"{num} программистa");
- }
- else if (num % 10 == 1 || num == 1)
- {
- Console.WriteLine($"{num} программист");
- }
- else
- {
- Console.WriteLine($"{num} программистов");
- }
- }
- Console.ReadLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement