fork(1) download
  1. #include <stdio.h>
  2.  
  3. int main (void) {
  4. int age;
  5.  
  6. printf ("Age? \n");
  7. scanf ("%d", &age);
  8.  
  9. if (age >= 18) {
  10. printf ("18 and over\n");
  11. }
  12.  
  13. if (age < 18) {
  14. printf ("Under 18\n");
  15. }
  16.  
  17. return 0;
  18. }
Success #stdin #stdout 0s 2056KB
stdin
2147483648
stdout
Age? 
18 and over