grach

3EqualNumbers

Jul 11th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.79 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 _3_Equal_Numbers
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.  
  14.             var a = double.Parse(Console.ReadLine());
  15.             var b = double.Parse(Console.ReadLine());
  16.             var c = double.Parse(Console.ReadLine());
  17.  
  18.             if (a == b && b == c)
  19.             {
  20.                 Console.WriteLine("yes");
  21.             }
  22.  
  23.             else
  24.             {
  25.                 Console.WriteLine("no");
  26.             }
  27.  
  28.         }
  29.     }
  30. }
  31.  
  32.  
  33.  
  34. /*
  35. using System;
  36. using System.Collections.Generic;
  37. using System.Linq;
  38. using System.Text;
  39. using System.Threading.Tasks;
  40.  
  41. namespace _3_Equal_Numbers
  42. {
  43.     class Program
  44.     {
  45.         static void Main(string[] args)
  46.         {
  47.  
  48.             var a = double.Parse(Console.ReadLine());
  49.             var b = double.Parse(Console.ReadLine());
  50.             var c = double.Parse(Console.ReadLine());
  51.  
  52.             if (a == b)
  53.             {
  54.                 if (b == c)
  55.                 {
  56.                     if (c == a)
  57.                     {
  58.                         if (b == a)
  59.                         {
  60.                             if (c == b)
  61.                             {
  62.                                 if (a == c)
  63.                                
  64.                                    
  65.                                                 Console.WriteLine("yes");
  66.                                            
  67.                                         }
  68.                                     }
  69.                                
  70.                     }
  71.                 }
  72.             }
  73.             else {
  74.                 Console.WriteLine("no");
  75.             }
  76.         }
  77.     }
  78. }
  79. */
Advertisement
Add Comment
Please, Sign In to add comment