Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace CSharpJunirHomeWork06
- {
- class Program
- {
- static void Main(string[] args)
- {
- string patientSurname;
- string patientName;
- string patientPatronymic;
- string patientStreet;
- int patientBuilding;
- int ageYears;
- int currentYear = 2021;
- int birthYear;
- float patientHeight;
- float patientWeight;
- float queteletIndex;
- string patientChronicDiseases;
- string patientAllergies;
- long patientTelephoneNumber;
- Console.WriteLine("после успешного подсчета старушек из предыдущего задания, вы решили посещать доктора онлайн");
- Console.WriteLine("Нажмите любую клавишу для продолжения ...");
- Console.ReadKey();
- Console.WriteLine("Поздравляем с успешной регистрацией в онлайн поликлинике.");
- Console.WriteLine("Заполните небольшую анкету, чтобы доктор с Вами познакомился");
- Console.Write("Фамилия: ");
- patientSurname = Console.ReadLine();
- Console.Write("Имя: ");
- patientName = Console.ReadLine();
- Console.Write("Отчество: ");
- patientPatronymic = Console.ReadLine();
- Console.Write("номер телефона без пробелов и дефиса, начиная с кода страны : ");
- patientTelephoneNumber = Convert.ToInt64(Console.ReadLine());
- Console.Write("улица: ");
- patientStreet = Console.ReadLine();
- Console.Write("номер дома: ");
- patientBuilding = Convert.ToInt32(Console.ReadLine());
- Console.Write("Сколько полных лет исполняется в этом году? : ");
- ageYears = Convert.ToInt32(Console.ReadLine());
- birthYear = currentYear - ageYears;
- Console.Write("Рост в см: ");
- patientHeight = Convert.ToSingle(Console.ReadLine());
- Console.Write("Вес в кг: ");
- patientWeight = Convert.ToSingle(Console.ReadLine());
- queteletIndex = patientWeight / (patientHeight * patientHeight /10000);
- Console.Write("Перечислите Ваши хронические заболевания: ");
- patientChronicDiseases = Console.ReadLine();
- Console.Write("Перечислите непереносимые лекарства: ");
- patientAllergies = Console.ReadLine();
- Console.WriteLine("Вы успешно заполнили анкету.");
- Console.WriteLine("Нажмите любую клавишу для продолжения ...");
- Console.ReadKey();
- Console.WriteLine($"Вы {patientSurname} {patientName} {patientPatronymic} {birthYear} года рождения. " +
- $"Ваш рост {patientHeight} см, вес {patientWeight} кг, индекс массы тела {queteletIndex}. " +
- $"Хронические заболевания: {patientChronicDiseases}. Непереносимость лекарств: {patientAllergies}. " +
- $"В случае необходимости врач приедет к Вам по адресу город Энск, улица {patientStreet}, дом {patientBuilding}. " +
- $"Телефон для связи {patientTelephoneNumber: +## (###) ### ## ##}");
- Console.ReadLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement