-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
41 lines (37 loc) · 1.43 KB
/
Program.cs
File metadata and controls
41 lines (37 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
using System;
namespace AddressProject
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Введите индекс: ");
int index = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Введите страну: ");
string country = Console.ReadLine();
Console.WriteLine("Введите город: ");
string city = Console.ReadLine();
Console.WriteLine("Введите улицу: ");
string street = Console.ReadLine();
Console.WriteLine("Введите дом: ");
int house = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Введите квартиру: ");
int apartment = Convert.ToInt32(Console.ReadLine());
Address address = new Address();
address.Index = index;
address.Country = country;
address.City = city;
address.Street = street;
address.House = house;
address.Apartment = apartment;
Console.WriteLine("Посылка отправлена по адресу: "
+ address.Index + " "
+ address.Country + " "
+ address.City + " "
+ address.Street + " "
+ address.House + " "
+ address.Apartment);
Console.ReadKey();
}
}
}