Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.77 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 ConsoleApp2
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             string linijka = "";
  14.             Console.WriteLine("Wpisz tekst, po naciśnięciu Enter tekst obniży się o jedną linijkę");
  15.  
  16.             while (true)
  17.             {
  18.                 var button = Console.ReadKey();
  19.                 if (button.Key == ConsoleKey.Enter)
  20.                 {
  21.                    
  22.                     Console.SetCursorPosition(0, 0);
  23.                     Console.WriteLine("" + linijka);
  24.  
  25.                 }
  26.             }
  27.  
  28.             linijka = Console.ReadLine();
  29.  
  30.  
  31.  
  32.  
  33.  
  34.         }
  35.     }
  36.    
  37.    
  38.  
  39.  
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement