Sunday, June 6, 2021

simple program using function (POP) (155)

#include<iostream>

using namespace std;

void vote()

{

int age;

cout<<"please enter your age:";

cin>>age;

if(age>=18)

cout<<"you are eligible for casting vote:";

else

cout<<"you are not eligibal for casting vote:";

}

int main()

{

vote();

} 

No comments:

Post a Comment