std::cout << "Enter the first angle: "; std::cin >> angle1; std::cout << "Enter the second angle: "; std::cin >> angle2; if (areAdjacent(angle1, angle2)) { std::cout << "The angles are adjacent." << std::endl; } else { std::cout << "The angles are not adjacent." << std::endl; } return 0;
bool areAdjacent(int angle1, int angle2) {
if ((angle1 + angle2) == 180) {
return true;
} else {
return false;
}
}
int main() {
std::cout << "Enter the first angle: ";int angle1, angle2;
std::cin >> angle1;
std::cout << "Enter the second angle: ";
std::cin >> angle2;
if (areAdjacent(angle1, angle2)) {
std::cout << "The angles are adjacent." << std::endl;
} else {
std::cout << "The angles are not adjacent." << std::endl;
}
return 0;
}