include iostream include conio include math void main void int float x

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <iostream.h>
#include <conio.h>
#include <math.h>
void main(void)
{
int a,b,c;
float d,x1,x2, x;
cout <<"vvedite znacheniay kooeficientov a,b,c"<<endl;
cin>>d;
d=(b*b-4*a*c);
if (d>0)
{
x1=(b*b-sqrt(d))/2*a;
x2=(b*b+sqrt(d))/2*a;
cout<<"x1="<<x1<<" x2="<<x2;
}
else if (d==0)
{
x=((b*b)/2*a);
cout<<"x="<<x;
}
else cout<<"net kornei";
getch();
}