fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. double a=0.0,b=0.0,c=0.0;
  6.  
  7. int main()
  8. {
  9. while (!cin.eof())
  10. {
  11.  
  12. cin>>a>>b>>c;
  13. double delta=b*b-4*a*c;
  14. if (delta==0) cout<<1<<endl;
  15. else if (delta<0) cout<<0<<endl;
  16. else cout<<2<<endl;
  17. }
  18.  
  19. return 0;
  20. }
  21.  
Success #stdin #stdout 0s 15240KB
stdin
Standard input is empty
stdout
1