fork download
  1.  
Success #stdin #stdout 0.04s 25784KB
stdin
#include <stdio.h>

int main() {
    char text[] = "Hello World";
    printf("ข้อความ: %s\n", text);

    int h=0, e=0, l=0, o=0, w=0, r=0, d=0;
    for (char *p = text; *p; p++) {
        if (*p == 'h' || *p == 'H') h++;
        if (*p == 'e' || *p == 'E') e++;
        if (*p == 'l' || *p == 'L') l+=2;
        if (*p == 'o' || *p == 'O') o++;
        if (*p == 'w' || *p == 'W') w++;
        if (*p == 'r' || *p == 'R') r++;
        if (*p == 'd' || *p == 'D') d++;
    }

    printf("H/E: %d\n", h+e);
    printf("L: %d\n", l);
    printf("O: %d\n", o);
    printf("W: %d\n", w);
    printf("R: %d\n", r);
    printf("D: %d\n", d);

    
stdout
Standard output is empty