Напишите программу,которая находит все корни уравнения в диапозоне x от -100 до +100 :
ix^2 - 5x + 2i = 2
193
232
Ответы на вопрос:
c = int(input('enter 2 to start'))
while c ! = 1:
import math as m
a = int(input('write a: '))
b = int(input('write b: '))
c = int(input('write c: '))
d = (b ** 2) - (4 * a * c)
print ('d =',d)
if d > 0:
print('d > 0')
x = (-b + (m.sqrt( / (2 * a)
x1 = (-b - (m.sqrt( / (2 * a)
print ('x1 =',x)
print ('x2 =',x1)
elif d == 0:
print('d = 0')
x = -b / (2 * a)
print ('x =',x)
else:
print('d < 0')
print ('no roots')
c = int(input('enter 1 to quit or 2 to repeat'))
Популярно: Информатика
-
леньчайник02.03.2022 14:39
-
ukrainskayaa11.03.2023 16:13
-
sofyaamosovap0cc8l30.09.2021 02:02
-
Ferolhr12922.11.2021 23:25
-
daryatabuewa28.06.2022 09:31
-
rrrrrrrrtttttttttyyy07.10.2022 20:44
-
Kannb30.09.2021 03:29
-
kjhf222510.12.2022 03:07
-
6ahah981226.12.2022 14:57
-
Diмon11.06.2020 03:01