Advertisement
Guest User

Untitled

a guest
Aug 19th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4.  
  5.  
  6. int main()
  7. {
  8. char *command;
  9. printf("> ");
  10. scanf("%sn", &command);
  11. if (command == "qewr") {
  12. printf("programm");
  13. }
  14. getch();
  15. return 0;
  16. }
  17.  
  18. #include <stdio.h>
  19. #include <stdlib.h>
  20. #include <string.h>
  21.  
  22.  
  23. int main()
  24. {
  25. char *command;
  26. printf("> ");
  27. command = "qewr";
  28. if (command == "qewr") {
  29. printf("programm");
  30. }
  31. getch();
  32. return 0;
  33. }
  34.  
  35. char *command;
  36. scanf("%sn", &command);
  37.  
  38. #include <stdio.h>
  39. #include <stdlib.h>
  40. #include <string.h>
  41. #include <conio.h>
  42.  
  43.  
  44. int main()
  45. {
  46. char command[128];
  47. printf("> ");
  48. fgets(command,128,stdin);
  49. if (command[strlen(command)-1] == 'n')
  50. command[strlen(command)-1] = 0;
  51.  
  52. if (strcmp(command,"qewr") == 0)
  53. {
  54. printf("programmn");
  55. }
  56. getch();
  57. return 0;
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement