Q.Enter the name,nationality and age of a Person.If the age is greater than 18 and Nationality is Indian,then you can Vote otherwise you cannot vote.Write a Program in C++ for this.
//Vote or Not
using namespace std;
cout<<"Enter Student Name:"<<endl;
cout<<"You can Vote ";
cout<<"You can not Vote";
It shows compilation error.Please help me to correct it.Thanx.
Looked pretty good for the most part- just don't forget the difference between = and ==.
When you use one equal sign, you're setting the variable to whatever is to the right of the equal sign.
ex: x = 5;
If you want to ask the compiler to check whether or not two things are equal, you'll need to use two equal signs.
ex: if(a == 5)
do cool stuff;