fork download
  1. #include <stdio.h>
  2. #include "string.h"
  3. #include <stdio.h>
  4.  
  5.  
  6. int main() {
  7.  
  8.  
  9. char buffer[128];
  10. printf("Ready");
  11. scanf("%s",buffer);
  12. printf("I got '%s'\n", buffer);
  13. if(strcmp(buffer,"acceso")==0) {
  14. printf("LED ON");
  15. //myled=1;
  16. }
  17. if (strcmp(buffer,"spento")==0) {
  18. printf("LED OFF");}
  19. //myled=0;
  20.  
  21. memset(buffer,'0',1);
  22. printf(buffer);
  23. }
  24.  
Success #stdin #stdout 0s 2172KB
stdin
Standard input is empty
stdout
ReadyI got ''
0