填空
```c++
1. (填空题)
#include <iostream>
using namespace std;
int f1(int x)
{cin>>x;
return x;
}
void f2(int x)
{cout<<x<<endl;
}
int main() {
int a;
-------------------- ;
getchar();
getchar();
return 0;
}
```c++
完成程序,从键盘输入a、b和c,得到一个一元二次方程并输出根。
#include <iostream>
#include <cmath>
using namespace std;
-----------------------//函数名为f1
{cin>>x;
return x;
}
------------------------- //二次方程的系数依次为a,b,c
{ double x1, x2;
------------------------- ;
x1=(-b+sqrt(b*b-4*a*c))/2/a;
x2=(-b-sqrt(b*b-4*a*c))/2/a;
----------- ;//调用函数f2输出第一个根
------------;//调用函数f2输出第二个根
}
void f2(double x)
{cout<<x<<endl;
}
int main() {
float a;
a=f1();
if(a!=0) ---------------;//调用函数f
else cout<<"不是一个二次方程"<<endl;
getchar();
getchar();
return 0;
}