#39964: c++提示(挖空,每格空數不代表字數,每格可能不止一字)


112225 (unknown)

學校 : 國立臺中女子高級中學
編號 : 268965
來源 : [211.23.3.219]
最後登入時間 :
2024-05-01 11:41:00
a006. 一元二次方程式 | From: [114.35.47.55] | 發表日期 : 2024-04-15 21:27

#include<iostream>
#include<cmath>
 
using namespace std;
 
int main()
{int a,b,c;
cin>>a>>b>>c;
if(空空空)
{cout <<"No real root"<<endl;
}
空空空(b*b-4*a*c==0)
{
cout << "空空空" << " x=" << (-b)/(2*a)<< endl;
}
else if(b*b-4*a*c>0)
{
cout << "Two different roots" << " x1=" << 空空空<< " , x2=" << 空空空;
}
 
return 0;
}
 
ZeroJudge Forum