fork download
  1. #include <stdio.h>
  2.  
  3. int main() {
  4. char input[256];
  5.  
  6. printf("Enter flag to check: ");
  7. scanf("%s", input);
  8. if (strlen(input) != 12) {
  9. printf("Wrong length!\n");
  10. return 0;
  11. }
  12. if (strcmp(input, "MicCheck_h4w") <= 0) {
  13. printf("Wrong check 1!\n");
  14. return 0;
  15. }
  16. if (strcmp(input, "MicCheck_h4y") >= 0) {
  17. printf("Wrong check 2!\n");
  18. return 0;
  19. }
  20. printf("Yes! Correct flag is %s\n", input);
  21. return 0;
  22. }
  23.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:1: error: illegal character: '#'
#include <stdio.h>
^
Main.java:1: error: class, interface, or enum expected
#include <stdio.h>
         ^
Main.java:6: error: class, interface, or enum expected
    printf("Enter flag to check: ");
    ^
Main.java:7: error: class, interface, or enum expected
    scanf("%s", input);
    ^
Main.java:8: error: class, interface, or enum expected
    if (strlen(input) != 12) {
    ^
Main.java:10: error: class, interface, or enum expected
        return 0;
        ^
Main.java:11: error: class, interface, or enum expected
    }
    ^
Main.java:14: error: class, interface, or enum expected
        return 0;
        ^
Main.java:15: error: class, interface, or enum expected
    }
    ^
Main.java:18: error: class, interface, or enum expected
        return 0;
        ^
Main.java:19: error: class, interface, or enum expected
    }
    ^
Main.java:21: error: class, interface, or enum expected
    return 0;
    ^
Main.java:22: error: class, interface, or enum expected
}
^
13 errors
stdout
Standard output is empty