
Што не так С++ ( #include using namespace std; int main() { double
ab,ad,ax,ay,bx,by,dx,dy,cx,cy,o1,o2,d1,d2,v; if(ax,ay,bx,by,dx,dy,cx,cy < 100); cin>>ax>>" ">>ay; cin>>bx>>" ">>by; cin>>cx>>" ">>cy; cin>>dx>>" ">>dy; ab=bx-ax; ad=ay-dy; v=2*(ab*ab+ad*ad); v=d1+d2; d1=d2-ad; o1=ad; o2=ab; o1,o2,d1,d2;~0,001; cout<

Ответы на вопрос

Во-вторых ЧТО ЭТО ВООБЩЕ ТАКОЕ?!! Это... это просто... I have not any words about it...
#include - подключение какой-либо библиотеки (#include <iostream>)
if(ax,ay,bx,by,dx,dy,cx,cy < 100) - это непонятно даже мне (компу и подавно)
cin>>ax>>" ">>ay; в cin не пишутся кавычки
~ - вообще непонятно откуда.
Вывод либо автор сего произведения не в себе, либо это какой-то троллинг людей, которые будут читать это



There are several issues with the provided C++ code. I'll list them one by one and explain the problems:
- Missing header files: The code lacks the necessary header files for the standard input/output operations and basic mathematical functions. You should include the required headers at the beginning of the code:
cpp#include <iostream>
#include <cmath>
Incorrect usage of comma operator in the if statement: The if statement seems to be misused. It should contain a condition that evaluates to either true or false. Instead, it contains multiple variables separated by commas, which is not meaningful in this context. It's not clear what you intended to do with the if statement, but as it stands, it doesn't serve any purpose.
Incorrect input syntax: The input statements have some issues. When you use the
cin
function, you don't need to use>>
for each variable multiple times. Instead, you can use a single line ofcin
statement for each set of inputs.Incorrect variable assignments: There are some incorrect variable assignments. For example, you calculate
v
and then immediately override it withd1 + d2
, without having calculatedd1
andd2
yet. Additionally, you have some statements likeo1, o2, d1, d2; ~0,001;
, which are not valid in C++.Uninitialized variables: Some variables, like
d1
andd2
, are being used before they are assigned any value, leading to undefined behavior.
To correct these issues, let's make the necessary adjustments:
cpp#include <iostream>
#include <cmath>
using namespace std;
int main() {
double ab, ad, ax, ay, bx, by, dx, dy, cx, cy, o1, o2, d1, d2, v;
cout << "Enter ax ay: ";
cin >> ax >> ay;
cout << "Enter bx by: ";
cin >> bx >> by;
cout << "Enter cx cy: ";
cin >> cx >> cy;
cout << "Enter dx dy: ";
cin >> dx >> dy;
ab = bx - ax;
ad = ay - dy;
v = 2 * (ab * ab + ad * ad);
d1 = d2 - ad;
o1 = ad;
o2 = ab;
// If you intended to use comma as a decimal separator, use it like this:
// cout << fixed << setprecision(3) << v;
cout << "v = " << v << endl;
// Output other variables if needed.
return 0;
}
Please note that the code still lacks clarity in some areas. I'm not sure what you intended to calculate, so you may need to adjust it further based on your specific requirements. Additionally, if you meant to use a comma as a decimal separator, you need to adjust the output accordingly (e.g., using cout << fixed << setprecision(3) << v;
).


Похожие вопросы
Топ вопросов за вчера в категории Информатика
Последние заданные вопросы в категории Информатика
-
Математика
-
Литература
-
Алгебра
-
Русский язык
-
Геометрия
-
Английский язык
-
Химия
-
Физика
-
Биология
-
Другие предметы
-
История
-
Обществознание
-
Окружающий мир
-
География
-
Українська мова
-
Информатика
-
Українська література
-
Қазақ тiлi
-
Экономика
-
Музыка
-
Право
-
Беларуская мова
-
Французский язык
-
Немецкий язык
-
МХК
-
ОБЖ
-
Психология
-
Физкультура и спорт
-
Астрономия
-
Кыргыз тили
-
Оʻzbek tili