fork download
  1. #include <stdio.h>
  2. #include <string.h>
  3. int main() {
  4. char input[21];
  5. printf("Enter a phrase: ");
  6. fgets(input, 21, stdin);
  7. if (strcmp(input, "her eyes\n") == 0) {
  8. printf("an endless ocean in which I wanna drown away.\n");
  9. }
  10. else if (strcmp(input, "her lips\n") == 0) {
  11. printf("the sharpest thing which is torning me every day.\n");
  12. }
  13. else if (strcmp(input, "her smile\n") == 0) {
  14. printf("the most soothing thing which I can easily die for.\n");
  15. }
  16. else if (strcmp(input, "her words\n") == 0) {
  17. printf("a fragrance that calms my soul.\n");
  18. }
  19. else if (strcmp(input, "her hair\n") == 0) {
  20. printf("a dark cloudy sky.\n");
  21. }
  22. else {
  23. printf("Invalid input.\n");
  24. }
  25. return 0;
  26. }
Success #stdin #stdout 0s 5268KB
stdin
 
stdout
Enter a phrase: Invalid input.