Venciity

Отпечатване в конзолата - Пример

Jan 31st, 2014
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.48 KB | None | 0 0
  1. string greeting = "Hi!";
  2. string name = "Marry";
  3. int age = 18;
  4. Console.Write("{0} My Name is {1}.", greeting, name);
  5. Console.WriteLine("<-- Introduction");
  6. Console.Write("I am {0} years old.", age);
  7. Console.Write("<-- age{0}", Environment.NewLine);
  8. Console.Write("How old are you?");
  9. Console.Write("<-- Question");
  10. Console.WriteLine();
  11. Console.Write("What's your name?");
  12. Console.Write("<-- Another Question\r\n");//not recommended use
  13. Console.Write("This sentence is on a new line");
Advertisement
Add Comment
Please, Sign In to add comment