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;
- using System.Numerics;
- namespace TestingSoftUni
- {
- class Program
- {
- static void Main(string[] args)
- {
- int[] array = Console.ReadLine().Split().Select(int.Parse).ToArray();
- int magicNumber = int.Parse(Console.ReadLine());
- for (int i = 0; i < array.Length; i++)
- {
- for (int j = i; j < array.Length; j++)
- {
- if(i != j && array[i] + array[j] == magicNumber)
- {
- Console.WriteLine($"{array[i]} {array[j]}");
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement