seminar05

This commit is contained in:
nihonium 2022-11-10 16:22:41 +03:00
parent 1d5f2cac48
commit c01f40aca3
Signed by: nihonium
GPG key ID: 0251623741027CFC
7 changed files with 108 additions and 1 deletions

View file

@ -0,0 +1,18 @@
#include <algorithm>
#include <iostream>
#include <algorithm>
#include <string>
#include <numeric>
#include <cctype>
using std::string, std::cin, std::cout, std::endl;
bool strIsUpper(const string& s) {
return std::accumulate(s.begin(), s.end(), true, [](bool res, char c) {return res && (!isalpha(c) || isupper(c)); });
}
int main() {
string s;
getline(cin, s);
cout << strIsUpper(s) << endl;
}