+ 1
Wher is mistake?
using namespace std; int main () { int a, b, c, d, k, D; double x, X,y,Y; cin>>a; cout<<"b="; cin>>b; cout<<"c="; cin>>c; cout<<"d="; cin>>d; cout<<"k="; cin>>k; D=pow(b-d,2)-4*a*(c-k); x=-b+d-sqrt(D)/2*a; X=-b+d+sqrt(D)/2*a; y=d*x+k; Y=d*X+k; cout<<"["<<x<<";"<<y<<"]"<<", ["<<X<<","<<Y<<"]"<<endl; return 0; }
5 Antworten
+ 3
Did you want to write this code in c language?
+ 3
Of course it's cpp but just mention that Dima has mentioned c language in his description
+ 1
That's C++, not C. You need to include <iostream> and <math.h>
+ 1
Wow, can we please not abuse the tag system like this? 😅
Edit: Thank you for fixing, Nezzie!
0
That's a lot of green...