Facebook
From Karton, 5 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 256
  1. using System;
  2.  
  3. namespace Bajerek
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             Console.ForegroundColor = ConsoleColor.Blue;
  10.             Console.WriteLine("What's your name?");
  11.             string imie = Console.ReadLine();
  12.             Console.WriteLine("Hello, " + imie);
  13.             Console.WriteLine("How old are you?(number)");
  14.             int wiek;
  15.  
  16.             bool sprawdzenie = int.TryParse(Console.ReadLine(), out wiek);
  17.  
  18.             if (wiek >= 18)
  19.             {
  20.                 for (int i = 0; i < 10; i++)
  21.                 {
  22.                     Console.ForegroundColor = ConsoleColor.Cyan;
  23.                     Console.WriteLine("AMAZING");
  24.                 }
  25.             }
  26.             else if (sprawdzenie == false)
  27.             {
  28.                 Console.ForegroundColor = ConsoleColor.Red;
  29.                 Console.WriteLine("Nice man, you're potato");
  30.                 Console.Write("Try one more: ");
  31.                 int wiek2;
  32.                 bool sprawdzenie2 = int.TryParse(Console.ReadLine(), out wiek2);
  33.  
  34.                 if (wiek2 >= 18)
  35.                 {
  36.                     for (int i = 0; i < 3; i++)
  37.                     {
  38.                         Console.ForegroundColor = ConsoleColor.Cyan;
  39.                         Console.WriteLine("Take a beer homie!");
  40.                     }
  41.                 }
  42.                 else
  43.                 {
  44.                     Console.WriteLine("Go away kiddy XD");
  45.                 }
  46.             }
  47.             else
  48.             {
  49.                 Console.WriteLine("Go away kiddy XD");
  50.             }
  51.            
  52.             Console.ReadLine();
  53.  
  54.        
  55.         }
  56.        
  57.     }  
  58. }
  59.