Advertisement
Guest User

zerosubset

a guest
Mar 30th, 2014
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.52 KB | None | 0 0
  1. using System;
  2.  
  3. class Program
  4. {
  5.     static void Main()
  6.     {
  7.         int[] subset = new int[5];
  8.        
  9.         for (int i = 0; i < 5; i++)
  10.             {
  11.                 subset[i] = int.Parse(Console.ReadLine());
  12.             }
  13.  
  14.         for (int j = 0; j < 5; j++)
  15.         {
  16.             for (int m = 0; m < 5; m++)
  17.             {
  18.                 if (subset[j] + subset[m] == 0)
  19.                 {
  20.                     Console.WriteLine("{0} + {1} = 0", subset[j], subset[m]);
  21.                 }
  22.             }
  23.         }
  24.  
  25.  
  26.  
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement