fork(1) download
  1. #include<stdio.h>
  2. #include<string.h>
  3. #define blanc ' '
  4. #define comma ','
  5. #define point '.'
  6.  
  7. int main(){
  8. int i = ' ', n=0;
  9. char res = ' ';
  10. // *res = '\0';
  11. //  res[0] = '\0';
  12. char oldc='0', newc;
  13. while(i!=EOF){
  14. i=getchar(); newc=i; n++;
  15.  
  16.     while(newc != '.' && newc != ' ' && newc!= ',') {
  17. if ((newc >= '0' && newc <= '9') || newc == 'A'){
  18. if (newc == 'A') newc = 10;
  19. if (newc >= oldc){
  20. if (newc ==10) newc = 'A';
  21. // strcat(res, newc);
  22. res += newc;} else {
  23. res = '0';
  24. break;
  25. }
  26. }
  27. } if (res != '0') {
  28. printf ("%c\n", res);
  29. res = '0';
  30. }
  31. }
  32. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
,11
compilation info
prog.c: In function ‘main’:
prog.c:16:1: error: stray ‘\302’ in program
     while(newc != '.' && newc != ' ' && newc!= ',') {
 ^
prog.c:16:2: error: stray ‘\240’ in program
     while(newc != '.' && newc != ' ' && newc!= ',') {
  ^
prog.c:16:4: error: stray ‘\302’ in program
     while(newc != '.' && newc != ' ' && newc!= ',') {
    ^
prog.c:16:5: error: stray ‘\240’ in program
     while(newc != '.' && newc != ' ' && newc!= ',') {
     ^
stdout
Standard output is empty