svetlozar_kirkov

Company Info (Exercise)

Sep 28th, 2014
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.39 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ConsoleTesting
  4. {
  5.     class ConsoleTesting
  6.     {
  7.         static void Main()
  8.         {
  9.             Console.Write("Company name: ");
  10.             string companyName = Console.ReadLine();
  11.             Console.Write("Company address: ");
  12.             string companyAddress = Console.ReadLine();
  13.             Console.Write("Company phone number: ");
  14.             string companyPhone = Console.ReadLine();
  15.             Console.Write("Company fax number: ");
  16.             string companyFax = Console.ReadLine();
  17.             Console.Write("Company website: ");
  18.             string companyWeb = Console.ReadLine();
  19.             Console.Write("Manager first name: ");
  20.             string managerFirstName = Console.ReadLine();
  21.             Console.Write("Manager surname: ");
  22.             string managerSurname = Console.ReadLine();
  23.             Console.Write("Manager phone number: ");
  24.             string managerPhone = Console.ReadLine();
  25.  
  26.             Console.WriteLine(new string('=', 20));
  27.  
  28.             Console.WriteLine("Company Info:\n{0}\n{1}\n{2}\n{3}\n{4}", companyName, companyAddress,
  29.                 companyPhone, companyFax, companyWeb);
  30.             Console.WriteLine(new string('-', 20));
  31.             Console.WriteLine("Manager Info:\n{0} {1}\n{2}", managerFirstName, managerSurname, managerPhone);
  32.  
  33.             Console.WriteLine(new string('=', 20));
  34.         }
  35.     }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment