Console.WriteLine("求解方程ax^2+bx+c=0的解."); Console.WriteLine("请分别输入a,b,c的值(注意每输入一个值按一下回车):"); double a = double.Parse(Console.ReadLine()); double b = double.Parse(Console.ReadLine()); double c = double.Parse(Console.ReadLine()); * a * c;…
#!/usr/bin/python # 导入math包 import math def quadratic(a, b, c): if not isinstance(a, (int, float))and isinstance(a, (int, float)) and isinstance(a, (int, float)): raise TypeError('a or b or c must be a number') dt = int(b) ** 2-(4*int(a)*int(c)) if a…