fork download
  1. // Online C compiler to run C program online
  2. #include <stdio.h>
  3.  
  4. int main() {
  5. int age;
  6. printf("age:");
  7. scanf("%d", &age);
  8. if (age >= 18){
  9. printf("ผ่านเข้างานได้\n");
  10. } else {
  11. printf("อายุต่ำกว่าเกณฑ์\n");
  12. }
  13.  
  14. return 0;
  15. }
Success #stdin #stdout 0.02s 25996KB
stdin
Standard input is empty
stdout
// Online C compiler to run C program online
#include <stdio.h>

int main() {
    int age;
    printf("age:");
    scanf("%d", &age);
    if (age >= 18){
        printf("ผ่านเข้างานได้\n");
    }   else {
        printf("อายุต่ำกว่าเกณฑ์\n");
    }

    return 0;
}