0% found this document useful (0 votes)
9 views3 pages

Else I

The document contains two C++ programs. The first program evaluates a user's grade and provides remarks based on the input, while the second program calculates a user's age from their year of birth and determines their voting eligibility. Both programs include user input and output statements to display results.

Uploaded by

Ella Mae Loresto
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views3 pages

Else I

The document contains two C++ programs. The first program evaluates a user's grade and provides remarks based on the input, while the second program calculates a user's age from their year of birth and determines their voting eligibility. Both programs include user input and output statements to display results.

Uploaded by

Ella Mae Loresto
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

using namespace std;

int main ()

int grade = 0;

cout << "Enter your grade: ";

cin >> grade;

cout << "--------------------------------" << endl;

if (grade <= 100 && grade >= 90)

cout << "Remarks is very good" << endl;

cout << "--------------------------------" << endl;

else if (grade <= 89 && grade >= 80)

cout << "Remarks is good" << endl;

cout << "--------------------------------" << endl;

else if (grade <= 79 && grade >= 75)

cout << "Remarks is poor" << endl;

cout << "--------------------------------" << endl;

else if (grade <= 74 && grade >= 65)

cout << "Remarks is failed" << endl;

cout << "--------------------------------" << endl;

else

{
cout << "Invalid grade" << endl;

cout << "--------------------------------" << endl;

cout << "Your grade is " << grade << endl;

return 0;

#include <iostream>

using namespace std;

int main ()

int age = 0;

int year = 0;

cout << "Enter your year of birth: ";

cin >> year;

cout << "------------------------------" << endl;

age = 2024 - year;

if (age >= 18)

cout << "You are QUALIFIED to vote" << endl;

cout << "------------------------------" << endl;

}
else

cout << "You are NOT QUALIFIED to vote" << endl;

cout << "------------------------------" << endl;

cout << "Your age is: " << age << endl;

cout << "------------------------------" << endl;

return 0;

You might also like