#include <iostream>
using namespace std;
int main() {
int userTickets, awardPoints;
cout << "Enter user tickets: ";
cin >> userTickets;
if (userTickets > 5)
{
awardPoints = 15;
}
else
{
awardPoints = userTickets;
}
cout << "Award points: " << awardPoints;
return 0;
}
Also please check what type of indentation you should use:
if (statement)
body;
or
if (statement) {
body;
}
or
if (statement)
{
body;
}
Comments
Leave a comment