saimun1

C programming test

Apr 24th, 2017
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.26 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main (int argc, char *argv[])
  4. {
  5.   int myAge = 0;
  6.   scanf("%d", &myAge);
  7.   if(myAge>18) {
  8.     printf("Alchohol consumption permitted");
  9.     }
  10.   else {
  11.     printf("Alchol consumption prohibited");
  12.     }
  13.     return 0;
  14.  
  15. }
Advertisement
Add Comment
Please, Sign In to add comment