Advertisement
remote87

Print Company Info

Aug 22nd, 2015
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.13 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 _02.PrintCompanyInformation
  8. {
  9.     class PrintCompanyInformation
  10.     {
  11.         static void Main()
  12.         {
  13.             List<string> info = new List<string>();
  14.             info.Add("Company name: ");
  15.             info.Add("Company address: ");
  16.             info.Add("Phone number: ");
  17.             info.Add("Fax number: ");
  18.             info.Add("Web site: ");
  19.             info.Add("Manager first name: ");
  20.             info.Add("Manager last name: ");
  21.             info.Add("Manager age: ");
  22.             info.Add("Manager phone: ");
  23.             string[] readInfo = new String[info.Count];
  24.             for (int i = 0; i < info.Count; i++)
  25.             {
  26.                 Console.Write(info[i]);
  27.                 readInfo[i] = Console.ReadLine();
  28.             }
  29.             string asterix = new String('*', Console.BufferWidth);
  30.             Console.WriteLine(asterix);
  31.             for (int i = 0; i < info.Count; i++)
  32.             {
  33.                 Console.WriteLine(readInfo[i]);
  34.             }
  35.         }
  36.     }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement