fork download
  1. #include <cstdio>
  2. #include <iostream>
  3. #include <string>
  4. #include <cstring>
  5. #define YELL_AT_END_USER(x) printf(#x
  6. #define THIS_LINE_IS_STUPID putchar('\n'
  7.  
  8. int main()
  9. {
  10. char input[50];
  11. std::string actualinput;
  12. printf("Input a string less than 30 characters long if you aren't a tool.");
  13. THIS_LINE_IS_STUPID);
  14. std::getline(std::cin, actualinput);
  15. if(actualinput.length() > 49)
  16. strcpy(input, "You are a tool.");
  17. else strcpy(input, actualinput.c_str());
  18. YELL_AT_END_USER(**************************));
  19. YELL_AT_END_USER(**************************));
  20. THIS_LINE_IS_STUPID);
  21. YELL_AT_END_USER(*));
  22. printf(input);
  23. YELL_AT_END_USER(*));
  24. THIS_LINE_IS_STUPID);
  25. YELL_AT_END_USER(**************************));
  26. YELL_AT_END_USER(**************************));
  27. }
Success #stdin #stdout 0s 3344KB
stdin
Standard input is empty
stdout
Input a string less than 30 characters long if you aren't a tool.
****************************************************
**
****************************************************