Saved Bookmarks
| 1. |
Write a program to check whether a person is eligible to vote using if statement. C++ program to check whether a person is eligible to vote using if statement |
|
Answer» #include <iostream> using namespace std; int main() { int age; cout<<"\n Enter your age:"; cin>> age; if(age>=18) cout<<"\n You are eligible for voting ...."; cout<<"This statement is always executed."; return 0; } Output: Enter your age: 23 You are eligible for voting …. This statement is always executed. |
|