Што не так С++
(
#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<

18 Окт 2019 в 15:42
136 +1
0
Ответы
1

There are several issues in the code:

The #include directive is missing a header file.

The use of the << and >> operators is incorrect. They should be used with cin and cout, respectively, instead of directly with variables.

The condition if(ax,ay,bx,by,dx,dy,cx,cy < 100); is incorrect. The comparison should be done separately for each variable.

The values for o1, o2, d1, d2 are not calculated properly.

The comparison o1,o2,d1,d2;~0,001; does not make sense. It should be done using comparison operators (<, >, ==, etc.).

Here is the corrected code:

#include <iostream>
using namespace std;
int main()
{
double ab, ad, ax, ay, bx, by, dx, dy, cx, cy, o1, o2, d1, d2, v;
cout << "Enter values for ax and ay: ";
cin >> ax >> ay;
cout << "Enter values for bx and by: ";
cin >> bx >> by;
cout << "Enter values for cx and cy: ";
cin >> cx >> cy;
cout << "Enter values for dx and dy: ";
cin >> dx >> dy;
ab = bx - ax;
ad = ay - dy;
v = 2 * (ab * ab + ad * ad);
d1 = d2 = ad;
o1 = o2 = ab;
if (o1 + o2 + d1 + d2 < 0.001) {
cout << "Values are less than 0.001" << endl;
} else {
cout << "Values are not less than 0.001" << endl;
}
return 0;
}
19 Апр в 10:31
Не можешь разобраться в этой теме?
Обратись за помощью к экспертам
Название заказа не должно быть пустым
Введите email
Бесплатные доработки
Гарантированные бесплатные доработки
Быстрое выполнение
Быстрое выполнение от 2 часов
Проверка работы
Проверка работы на плагиат
Интересные статьи из справочника
Поможем написать учебную работу
Название заказа не должно быть пустым
Введите email
Доверьте свою работу экспертам
Разместите заказ
Наша система отправит ваш заказ на оценку 90 246 авторам
Первые отклики появятся уже в течение 10 минут
Прямой эфир