#include <stdio.h>
int main(){
int age;
printf("Enter your age : ");
scanf("%d",&age);
while(age !=0){
if(age > 21 )
printf("you can drink buddy\n");
break;
else if(age<21)
printf("you can't drink it buddy \n");
break;
}
return 0;
}
so I wrote this program to check if they are allowed to drink or not according to their age but i don't know why its shows error when i added the break statement which was creating infinite loop