7
Объяснение:
k = 1 dat[1] = 12 12 > 12 (НЕТ) m = 0
k = 2 dat[2] = 15 15 > 12 (ДА) m = 1
k = 3 dat[3] = 17 17 > 12 (ДА) m = 2
k = 4 dat[4] = 15 15 > 12 (ДА) m = 3
k = 5 dat[5] = 14 14 > 12 (ДА) m = 4
k = 6 dat[6] = 12 12 > 12 (НЕТ) m = 4
k = 7 dat[7] = 10 10 > 12 (НЕТ) m = 4
k = 8 dat[8] = 13 13 > 12 (ДА) m = 5
k = 9 dat[9] = 14 14 > 12 (ДА) m = 6
k = 10 dat[10] = 15 15 > 12 (ДА) m = 7
#include <iostream>
#include <cmath>
using namespace std;
int main(void)
{int ax,bx,abx,ay,by,aby,az,bz,abz;
float v,amod,bmod,abmod;
cin>>ax>>ay>>az>>bx>>by>>bz;
abx=ay*bz-by*az;
aby=az*bx-ax*bz;
abz=ax*by-ay*bx;
amod=sqrt(pow(ax,2)+pow(ay,2)+pow(az,2));
bmod=sqrt(pow(bx,2)+pow(by,2)+pow(bz,2));
abmod=sqrt(pow(abx,2)+pow(aby,2)+pow(abz,2));
v=abs(ax*(by*abz-aby*bz)-ay*(bx-abz-abx*bz)+az*(bx*aby-abx*by));
cout<<"V="<<v<<endl;
if(v==0)
cout<<"YES";
else
cout<<"NO";
return 0;}
7
Объяснение:
k = 1 dat[1] = 12 12 > 12 (НЕТ) m = 0
k = 2 dat[2] = 15 15 > 12 (ДА) m = 1
k = 3 dat[3] = 17 17 > 12 (ДА) m = 2
k = 4 dat[4] = 15 15 > 12 (ДА) m = 3
k = 5 dat[5] = 14 14 > 12 (ДА) m = 4
k = 6 dat[6] = 12 12 > 12 (НЕТ) m = 4
k = 7 dat[7] = 10 10 > 12 (НЕТ) m = 4
k = 8 dat[8] = 13 13 > 12 (ДА) m = 5
k = 9 dat[9] = 14 14 > 12 (ДА) m = 6
k = 10 dat[10] = 15 15 > 12 (ДА) m = 7