Pages

Friday, November 1, 2013

Programming about age >= 21

Write a C program to determine whether a person is entitled to vote or not based on his/her age.(Note that a person aged 21 year old and above is netitled to vote)

#include<iostream>

using namespace std;
int main()

{

    int age;
    
    cout<<"enter your age"<<endl;
    cin>>age;
    
    if(age >= 21)
        cout<<"you can antitled to vote"<<endl;
        else
            cout<<"you not antitled to vote"<<endl;
    
    
       return 0;
    

}

No comments:

Post a Comment