/
Fleksey
/
ITIS_SM
Обзор
Документация
Войти
/
Fleksey
/
ITIS_SM
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
Program.cs
83 строки
3 KB
Flekseyy
1.1 Добавлены изменения в файл ReadMe.md
04 окт 2025, 13:02
04 окт 2025, 13:02
ad71d55
Код
Авторство
О чём код?
using System; namespace ITIS_New; class Program { public static void Main(string[] args) { // Д/З НАЧАЛО //#1 // int a = 23; // int b = 32; // a = a + b; // b = a - b; // a -= b; // Console.WriteLine(a); // Console.WriteLine(b); // #2 // string a = Console.ReadLine(); // Console.WriteLine(a[2].ToString() + a[1].ToString() + a[0].ToString()); // #3 // string time = Console.ReadLine(); // int numb_time = 30 *(int.Parse(time) % 12 ); // if (numb_time < 180) Console.WriteLine(numb_time.ToString() + "°" + " " + "Градусов"); // else Console.WriteLine((360 - numb_time).ToString() + "°" + " " + "Градусов"); // #5 // Console.WriteLine("Введите a"); // string a = Console.ReadLine(); // Console.WriteLine("Введите b"); // string b = Console.ReadLine(); // Console.WriteLine(( (int.Parse(b) - int.Parse(a) + 1) / 4) + " Високосных годов" ); // #6 // Console.WriteLine("Введите x1"); // string x1 = Console.ReadLine(); // Console.WriteLine("Введите y1"); // string y1 = Console.ReadLine(); // Console.WriteLine("Введите x2"); // string x2 = Console.ReadLine(); // Console.WriteLine("Введите y2"); // string y2 = Console.ReadLine(); // double res = Math.Sqrt( Math.Pow( (double.Parse(x1) - double.Parse(x2) ) , 2 ) + Math.Pow( (double.Parse(y1) - double.Parse(y2) ) , 2 ) ); // Console.WriteLine("Ответ: " + res); // Д/З Конец //Task1(1345); //Task2(1001,true); } // public static void Task1(int a) // { // bool isPositive = a>0; // bool isEven = (a%2)==0; // string positive = isPositive?"положительным":"отрицательным"; // string even = isEven?"четным":"нечетным"; // Console.WriteLine("Число " + a + " является " + positive + " и " + even); // //Console.WriteLine($"Число {a} является {positive} и {even}"); // //Console.WriteLine("Число {0} является {1} и {2}", a, positive, even); // } // public static void Task2(decimal totalPrice, bool isPremiumCustomer) // { // if(isPremiumCustomer) // { // totalPrice = totalPrice * 0.8m; // } // if(totalPrice > 1000) // { // totalPrice = totalPrice * 0.9m; // } // else // { // totalPrice = totalPrice * 0.95m; // } // Console.WriteLine("Итоговая цена " + totalPrice); // } }