Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- #include <iostream>
- using namespace std;
- int main(){
- double a, b, c, delta, aux;
- cin>>a;
- cin>>b;
- cin>>c;
- if(a==0) cout<<"NEESG\n";
- else{
- delta = ((b*b)-(4*a*c));
- if(delta<0){
- cout<<"NRR\n";
- }else{
- aux = ((-1*b)+ sqrt(delta))/(2*a);
- cout << setiosflags (ios::fixed) << setprecision (2)<< aux<<"\n";
- aux = ((-1*b)-sqrt(delta))/(2*a);
- cout << setiosflags (ios::fixed) << setprecision (2)<<aux <<"\n";
- }
- }
- // cout << setiosflags (ios::fixed) << setprecision (2)<< <<"\n";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement