int main(){
int age;
printf("enter your age\n");
scanf("%d",&age);
printf("you have entered %d as your age\n",age);
if(age>=18){
printf("you can vote\n");
}
else {
printf("you cannot vote\n");
}
}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter