Untitled

Run Settings
LanguageC++
Language Version
Run Command
#include <iostream> #include <math.h> using namespace std; int main() { float a, b, c, D, z1, z2, z3, x1, x2; cin>>a>>b>>c; D = (b*b) - (4*a*c); if(D>0) { z1 = (-b+sqrt(D))/2*a; z2 = (-b-sqrt(D))/2*a; } else if(D == 0) { cout<<"Решений нет"; } else { z3 = -b/2*a; } if((z1>0 && z2>0) || z3>0){ x1 = sqrt(z1); x2 = sqrt(z2); cout<<x1<<x2; } else { cout<<"Решений нет"; } return 0; }
Editor Settings
Theme
Key bindings
Full width
Lines