fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. float A,B,C;
  7. while(cin>>A>>B>>C)
  8. {
  9. float delta;
  10. delta=B*B-4*A*C;
  11. if (delta==0)
  12. {
  13. cout<<"1"<<endl;
  14. }
  15. if (delta>0)
  16. {
  17. cout<<"2"<<endl;
  18. }
  19. if (delta<0)
  20. {
  21. cout<<"0"<<endl;
  22. }
  23. }
  24. return 0;
  25. }
  26.  
Success #stdin #stdout 0s 15240KB
stdin
Standard input is empty
stdout
Standard output is empty