Skip to main content
SEE CS 2083 LEARN • PRACTICE • SUCCEED 🔍

Thursday, March 11, 2021

📚 SEE COMPUTER SCIENCE • CDC 2083

C PROGRAM to enter age and display whether a person can vote or not.

📅 Updated learning resource Quick read 📱 Mobile friendly

 

1.     WRITE A C PROGRAM  to enter age and display whether a person can vote or not.

 

#include<stdio.h>

#include<conio.h>

int main()

{

int a;

printf("Enter your age: ");

scanf("%d", &a);

if(a>=18)

printf("You can vote");

else

printf("You cannot vote");

return 0;

}

 

No comments:

Post a Comment

Home 📖Chapters 🎯Quiz MCQs 🔍Search