#include <iostream>
using namespace std;
int main() {
int age;
bool isStudent;
cout << "Enter your age: ";
cin >> age;
cout << "Are you a student? (1 for yes, 0 for no): ";
cin >> isStudent;
if (age >= 18)
{
cout << "You are eligible to vote." << endl;
if (isStudent)
{
cout << "You can also apply for a student discount." << endl;
}
} else
{
cout << "You are not eligible to vote." << endl;
}
return 0;
}
To embed this program on your website, copy the following code and paste it into your website's HTML: