12345678910111213141516171819202122
#include <iostream> using namespace std; int main() { char array[100]; cin >> array; for (int i = 0; i < 100; i++){ if (array[i] == ' '){ cout << "space" << endl; } if (array[i] != ' '){ cout << "no space" << endl; } } return 0; }
12345
std::string line; std::getline(std::cin, line); /// etc...
if(array[i]==char(32))cout<<"space";
char(32)
' '