fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. string read_command () {
  5. char temp;
  6. cin.get(temp);
  7. string result = "";
  8. while (temp != ' ' && temp != '\n') {
  9. result += temp;
  10. cin.get(temp);
  11. }
  12. return result;
  13. }
  14.  
  15. int main() {
  16. cout<<read_command();
  17. return 0;
  18. }
Success #stdin #stdout 0s 3276KB
stdin
ala ma kota
stdout
ala