#include<iostream>
#include<string>
#include <initializer_list>
using std::initializer_list;
using std::cin;
using std::cout;
using std::endl;
using std::string;
int test_static_value() {
static size_t count = 0;
return ++count;
}
int test_static_value2() {
static size_t count;
return count;
}
void change(string& s1, string* s2) {
string temp = s1;
s1 = *s2;
*s2 = temp;
return;
}
bool checkTopChar(const string& s) {
for (auto& c : s) {
if (isupper(c))
return true;
}
return false;
}
string TurnLowChar(string& s) {
for (auto& c : s) {
c = tolower(c);
}
return s;
}
void testIntArr(int(&arr)[3]) {
for (auto& c : arr) {
cout << c << endl;
}
return;
}
void error_msg(initializer_list<string> il) {
for (auto beg = il.begin(); beg != il.end(); beg++)
cout << *beg << " ";
cout << endl;
return;
}
int main(int argc,char **argv) {
//*************************test Program6.7
//string s1;
//do {
// cout << "enter Y show your the value of count,enter N close the program" << endl;
// cin >> s1;
// if (s1 == "Y")
// cout << test_static_value()<<endl;
//} while (s1 != "N");
//cout<<"value of fun 2 "<< test_static_value2()<<endl;
//**************************test Program 6.12
//string s1;
//string s2;
//string* s = &s2;
//cout << "enter string s1,s2" << endl;
//cin >> s1 >> s2;
//change(s1, s);
//cout << "change the contain of s1 and s2" << endl;
//cout << "s1: " << s1 << endl;
//cout << "s2: " << s2 << endl;
//*********************test Program6.17 & 6.19
//string s1;
cin >> s1;
//getline(cin, s1);
//cout << "check whether there is Toper Char: " << ((checkTopChar(s1))? "Yes":"No")<< endl;
//cout << "Turn the toper to lower format: " << TurnLowChar(s1) << endl;
//*********************test Program 6.23
//int intArr[] = { 2,3,3.14 };
//int intArr2[3] = { 2,3,4 };
//int intArr3[4] = { 1,2,3,4 };
//testIntArr(intArr);
//testIntArr(intArr2);
//****************test Program 6.25
//for (decltype(argc) i = 0; i < argc; i++) {
// const char* s;
// s = *(argv + i);
// if (s)
// {
// while (*s) {
// cout << *s++;
// }
// }
// cout << endl;
//}
//*************************test program6.27
string s1;
while (getline(cin, s1)) {
if (s1 != "string")
error_msg({ "it","is",s1,"not","string" });
else
error_msg({ "it","is",s1 ,"."});
}
return 0;
}