#include <iostream>
#include <vector>
#include <cstdlib>
#include <ctime>
#include <algorithm>
using namespace std;
int main() {
vector<int> arr;
arr.resize(5);
for (int i = 0; i < 5; ++i) {
cout << "#" << i + 1 << ": ";
cin >> arr[i];
}
if ((arr[4] > arr[0] && arr[4] < arr[1]) || (arr[4] > arr[2] && arr[4] < arr[3])) {
cout << "yes";
return 0;
cout << "no";
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
#include <iostream>
#include <vector>
#include <cstdlib>
#include <ctime>
#include <algorithm>
using namespace std;
int main() {
vector<int> arr;
arr.resize(5);
for (int i = 0; i < 5; ++i) {
cout << "#" << i + 1 << ": ";
cin >> arr[i];
}
if ((arr[4] > arr[0] && arr[4] < arr[1]) || (arr[4] > arr[2] && arr[4] < arr[3])) {
cout << "yes";
return 0;
}
cout << "no";
}