Advertisement
marekov

Srbsko

Apr 21st, 2020
389
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.03 KB | None | 0 0
  1. using System;
  2.  
  3. namespace SrbskoUnleashed
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             while (true)
  10.             {
  11.                 bool isSinger = true;
  12.                 bool isPlace = false;
  13.                 string line = Console.ReadLine();
  14.                 if (line.Equals("End"))
  15.                     break;
  16.                 string[] tokens = line.Split();
  17.                 if (tokens[0].Contains('@'))
  18.                     continue;
  19.                 string singer = string.Empty;
  20.                 string venue = string.Empty;
  21.  
  22.                 foreach (var item in tokens)
  23.                 {
  24.                     if(isSinger)
  25.                         singer += item;
  26.                     if (item.Contains('@'))
  27.                     {
  28.                         isSinger = false;
  29.                         isPlace = true;
  30.                     }
  31.                     if()
  32.                     if (isPlace)
  33.                         venue += item;
  34.                 }
  35.             }
  36.         }
  37.     }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement