Files
exercises/cs101/dh_20260917_03.cpp
T
2026-09-25 20:20:01 +08:00

25 lines
437 B
C++

#include <iostream>
#include <sstream>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
string token;
float coord[2];
for (int i = 0; getline(cin, token, ','); i++) {
coord[i] = stof(token);
}
if (-1 <= coord[0] && coord[0] <= 1 && -1 <= coord[1] && coord[1] <= 1) {
cout << "yes" << endl;
} else {
cout << "no" << endl;
}
return 0;
}