#include <iostream>
using namespace std;
int main()
{
int age; // You missed the semi-colon while declaring the age.
cout << "How old are you";
cin >> age;
if(age>17)
{
cout << "You can vote";
}
else
{
cout << "You can't vote";
}
return 0;
}
Also, take care of the indentation while programming. Although it doesn't matter in C++ but it increases readability.
Happy coding!