Wher is mistake? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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; }

12th Oct 2018, 9:31 AM
Dima Moshko
Dima Moshko - avatar
5 Answers
+ 3
Did you want to write this code in c language?
12th Oct 2018, 9:37 AM
Nika Soltani Tehrani
Nika Soltani Tehrani - avatar
+ 3
Of course it's cpp but just mention that Dima has mentioned c language in his description
12th Oct 2018, 10:48 AM
Nika Soltani Tehrani
Nika Soltani Tehrani - avatar
+ 1
That's C++, not C. You need to include <iostream> and <math.h>
12th Oct 2018, 9:44 AM
Anna
Anna - avatar
+ 1
Wow, can we please not abuse the tag system like this? 😅 Edit: Thank you for fixing, Nezzie!
12th Oct 2018, 1:13 PM
Janning⭐
Janning⭐ - avatar
0
That's a lot of green...
12th Oct 2018, 1:25 PM
HonFu
HonFu - avatar