Advertisement
Guest User

Untitled

a guest
May 4th, 2015
857
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.66 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 SequencesOfStrings_4
  8. {
  9.     class SequencesOfStrings_4
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             string[] input = Console.ReadLine().Split();
  14.  
  15.             for (int i = 0; i < input.Length - 1; i++)
  16.             {
  17.                 Console.Write(input[i]+" ");
  18.                 if (!input[i].Equals(input[i + 1]))
  19.                 {
  20.                     Console.WriteLine();
  21.                 }
  22.             }
  23.             Console.Write(input[input.Length-1]);
  24.             Console.WriteLine();
  25.         }
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement