Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApp1
- {
- class Program
- {
- static void Main(string[] args)
- {
- int a, c3, c2, c1;
- Console.Write("Введите число: ");
- a = int.Parse(Console.ReadLine());
- c3 = a % 10;
- c2 = (a / 10) % 10;
- c1 = (a / 100) % 10;
- Console.WriteLine((c3==c2 && c1==c2 && c1 == c3)? "Да, одинаковые" : "Нет, разные");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement