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 практическая_8
- {
- class Program
- {
- static void Main(string[] args)
- {
- int a, b, c, d;
- Console.WriteLine("Введите а:");
- a = Convert.ToInt32(Console.ReadLine());
- Console.WriteLine("Введите b:");
- b = Convert.ToInt32(Console.ReadLine());
- Console.WriteLine("Введите c:");
- c = Convert.ToInt32(Console.ReadLine());
- Console.WriteLine("Введите d:");
- d = Convert.ToInt32(Console.ReadLine());
- if (a != b )
- {
- if (c == a) { if (d != c) { Console.WriteLine("error"); } else { Console.WriteLine("2"); } }
- else
- {
- if (c == b) { if (d != c) { Console.WriteLine("error"); } else { Console.WriteLine("1"); } }
- }
- }
- else
- {
- if (c == b) { if (d == b) { Console.WriteLine("error"); } else { Console.WriteLine("4"); } }
- else {
- if (d!=b) {Console.WriteLine("error");} else {Console.WriteLine("3");}
- }
- }
- Console.ReadKey();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement