fork download
  1. #include <iostream>
  2. #include <cstdio>
  3. using namespace std;
  4.  
  5. int main() {
  6. char c, s[100];
  7. int i = 0;
  8. scanf("%c", &c);
  9. while (c != '\n')
  10. {
  11. s[i++] = c;
  12. scanf("%c", &c);
  13. }
  14. //for(int j=0; j<i; j++) cout<<s[j];
  15. printf("%s", s);
  16. return 0;
  17. }
Success #stdin #stdout 0s 3300KB
stdin
hey sum it is read as 2 inputs because of space in between.
stdout
hey sum it is read as 2 inputs because of space in between.`�9��\���p�4�҆