some programs!
This commit is contained in:
1 parent
5d30e847c1
commit
ed054247d5
32 files changed
+1882
-149
No files matched your search
@@ -0,0 +1,24 @@
|
||||
#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;
|
||||
}
|
||||
Reference in new issue
Block a user