fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. string tekst;
  8. string tekst1;
  9. tekst1 = " ";
  10.  
  11. Console.WriteLine("siemka, podaj jak masz na imię");
  12. tekst = Console.ReadLine();
  13.  
  14. if (tekst == null || tekst.Length == 0) {
  15. goto koniec;
  16. }
  17.  
  18. Console.WriteLine(tekst+" " + "Witam CIę");
  19.  
  20. powtorz:
  21. Console.WriteLine("podaj imie drugi raz");
  22. tekst1 = Console.ReadLine();
  23.  
  24. if (tekst1 == null)
  25. goto koniec;
  26. else if (tekst != tekst1 && tekst1.Trim().Length>0) {
  27. Console.WriteLine("Niepoprawnie: ["+tekst1+"]");
  28. goto powtorz;
  29. }
  30.  
  31. Console.WriteLine("BRAWO!");
  32.  
  33. koniec:
  34. Console.WriteLine("");
  35. }
  36.  
  37. }
Success #stdin #stdout 0s 29664KB
stdin
Stefan
Konstantyn
stdout
siemka, podaj jak masz na imię
Stefan Witam CIę
podaj imie drugi raz
Niepoprawnie: [Konstantyn]
podaj imie drugi raz