fork download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4. #include <ctype.h>
  5.  
  6. const char* decodeCode(const char* encodedString)
  7. {
  8. const char* decodedString = ""; // ERROR
  9. const char* a = encodedString;
  10.  
  11. for(int j=0;j <strlen(a);j++)
  12. {
  13. if (isdigit(a[j]) || a[j] == '#')
  14. continue;
  15. else return ""; //ERROR
  16. }
  17. return 0;
  18. }
  19.  
  20. int main()
  21. {
  22. const char* a;
  23. a = decodeCode("6999066263304447777077766622337778"); // ERROR
  24. printf("%s",a);
  25. return 0;
  26. }
  27.  
Success #stdin #stdout 0.01s 2724KB
stdin
Standard input is empty
stdout
(null)