Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as C++ by Nicholas_Arsa ( 5 years ago )
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
int a,b,c,x1,x2;
cout<<"a : ";
cin>>a;
cout<<"b : ";
cin>>b;
cout<<"c : ";
cin>>c;
cout<<"persamaan : "<<"("<<a<<") x^ + ("<<b<<")x + ("<<c<<") = 0"<<endl;
x1=(-b+sqrt(pow(b,2)-4*a*c))/(2*a);
x2=(-b-sqrt(pow(b,2)-4*a*c))/(2*a);
cout<<"x1 : "<<x1<<endl;
cout<<"x2 : "<<x2;
return 0;
}
Revise this Paste