#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int x[3];
int y[3];
int arr[3];
for (int i = 0;i < 3;i++) {
cin >> x[i] >> y[i];
}
arr[0] = (x[0] - x[1]) ^ 2 + (y[0] - y[1]) ^ 2;
arr[1] = (x[1] - x[2]) ^ 2 + (y[1] - y[2]) ^ 2;
arr[2] = (x[2] - x[0]) ^ 2 + (y[2] - y[0]) ^ 2;
if ( (y[1] - y[0]) (x[2] - x[0]) - (y[1] - y[0]) (x[1] - x[0]) ) {
cout << 'X';
return 0;
} else if (max(arr,arr+3) == arr[0] + arr[1] + arr[2] - max(arr,arr+3)) {
if (arr[0] != arr[1] && arr[1] != arr[2] && arr[2] != arr[0]) {
cout << " JikkakTriangle";
return 0;
}
else{
cout << "Jikkak2Triangle";
return 0;
}
} else if (max(arr,arr+3) > arr[0] + arr[1] + arr[2] - max(arr,arr+3)) {
if (arr[0] != arr[1] && arr[1] != arr[2] && arr[2] != arr[0]) {
cout << "DunkakTriangle";
return 0;
}
else{
cout << "Dunkak2Triangle";
return 0;
}
}
else if (max(arr,arr+3) < arr[0] + arr[1] + arr[2] - max(arr,arr+3)) {
if (arr[0] != arr[1] && arr[1] != arr[2] && arr[2] != arr[0]) {
cout << "DunkakTriangle";
return 0;
}
else{
cout << "YeahkakTriangle";
return 0;
}
}
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: