Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Console.WriteLine("Лабораторная работа №2");
- Console.WriteLine("SomeBody\n");
- Console.WriteLine("b^2 - 4 * a/c");
- Console.WriteLine("Введите значения переменных a, b и c: ");
- Console.Write("a = ");
- double a = int.Parse(Console.ReadLine());
- Console.Write("b = ");
- double b = int.Parse(Console.ReadLine());
- Console.Write("c = ");
- double c = int.Parse(Console.ReadLine());
- for (int i = 0; i <= 0; i++)
- {
- if (a < -1000 || a > 1000 || b < -1000 || b > 1000 || c < -1000 || c > 1000)
- {
- Console.WriteLine("Вы ввели некорректное значение, попробуйте снова :(");
- Console.ReadLine();
- Console.Clear();
- Console.WriteLine("Лабораторная работа №2");
- Console.WriteLine("SomeBody\n");
- Console.WriteLine("b^2 - 4 * a/c");
- Console.WriteLine("Введите значения переменных a, b и c: ");
- Console.Write("a = ");
- double repeat_1 = int.Parse(Console.ReadLine());
- Console.Write("b = ");
- double repeat_2 = int.Parse(Console.ReadLine());
- Console.Write("c = ");
- double repeat_3 = int.Parse(Console.ReadLine());
- }
- else
- {
- double result = (b * b) - 4 * a / c;
- Console.WriteLine("Результат: " + result);
- break;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement