0

I can see the output when I use the compiler but when I use the exe separately, it closes after finishing, so I can't see the output. What can I do to make the exe stay open?

#include <iostream>
#include <math.h>
using namespace std;
int main()
{
    setlocale (LC_ALL,"hun");
    cout<<"b: ";
    double b,a,c,x1,x2,valami,gyokalattvalami,minusb,kettoa;
    cin>>b;
    cout<<"a: ";
    cin>>a;
    cout<<"c: ";
    cin>>c;
    valami=pow(b,2)-4*a*c;
    //cout<<valami <<endl;
    gyokalattvalami=pow(valami,0.5);
    //cout<<gyokalattvalami;
    minusb=b-b*2;
    //cout<<minusb;
    kettoa=2*a;
    //cout<<kettoa;
    x1=(minusb+gyokalattvalami)/kettoa;
    x2=(minusb-gyokalattvalami)/kettoa;
    system("CLS");
    cout<<"X1=" <<x1 <<endl;
    cout<<"X2=" <<x2;
}
Dorbek
  • 1
  • 1
  • 1

0 Answers0