题解 1028: [编程入门]自定义函数求一元二次方程

来看看其他人写的题解吧!要先自己动手做才会有提高哦! 
返回题目 | 我来写题解

筛选

自定义函数求一元二次方程

摘要:解题思路:注意事项:参考代码:#include <stdio.h> #include <math.h> #include <complex.h> // 计算并输出实数根的函数 void r……

求一元二次方程

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){    double a, b, c, x1=0, x2=0;    scanf(……

自定义函数求一元二次方程(switch语句)

摘要:解题思路:根据一元二次方程求根公式的三种情况,用switch语句来判断注意事项:当求根公式<0时,i^2=-1,若为根号下的负数,可写为根号下该数的整数*i参考代码:#include<stdio.h>……

自定义函数求一元二次方程

摘要:解题思路:注意事项:参考代码:#include<math.h>#include<complex.h>int main(){    double a,b,c,d;    double complex t……