Advertisement
Guest User

Untitled

a guest
Jan 30th, 2015
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.98 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace практическая_8
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int a, b, c, d;
  14. Console.WriteLine("Введите а:");
  15. a = Convert.ToInt32(Console.ReadLine());
  16. Console.WriteLine("Введите b:");
  17. b = Convert.ToInt32(Console.ReadLine());
  18. Console.WriteLine("Введите c:");
  19. c = Convert.ToInt32(Console.ReadLine());
  20. Console.WriteLine("Введите d:");
  21. d = Convert.ToInt32(Console.ReadLine());
  22. if (a != b )
  23. {
  24. if (c == a) { if (d != c) { Console.WriteLine("error"); } else { Console.WriteLine("2"); } }
  25. else
  26. {
  27. if (c == b) { if (d != c) { Console.WriteLine("error"); } else { Console.WriteLine("1"); } }
  28.  
  29. }
  30.  
  31. }
  32. else
  33. {
  34. if (c == b) { if (d == b) { Console.WriteLine("error"); } else { Console.WriteLine("4"); } }
  35. else {
  36. if (d!=b) {Console.WriteLine("error");} else {Console.WriteLine("3");}
  37. }
  38. }
  39. Console.ReadKey();
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement