How to do the output in most simplest way for a beginner?

Two students, A and B, in csc 102 compared their grades (0 <= <= 5_ in the first 3 quizzes .
Grades for A: a1, a2, a3
Grades for B: b1, b2, b3

If a1>b1 then A receives one point
If a1<b1, then B receives one point
If a1=b1 then neither student receives a point

Given the grades of A and B, you are asked to write a C++ program to print the point totals of the two students.

Input Format:

The first line contains three space-seperated integers: a1, a2, a3
The second line contains three space-separated integers: b1, b2, b3

Output Format:
Print space separated integers denoting the respective point totals earned A and B

Instructions:
Run your program using different sets of input to validate it. Provide 1) the C++ program developed, 2) inputs used, and 3) output

- So this is a intro to c++ class and I asked a friend who mentioned something called “adding a counter” but I have no idea what that is because we never covered it, so what is the simplest way to do this?
A counter is commonly referred to as a number which you increment, which could be an "int" in C++. Commonly used in a for loop like: for(int i = 0; i < 3; ++i).
Nassah wrote:
what is the simplest way to do this?
1
2
int TotalA = ( a1 > b1 ) + ( a2 > b2 ) + ( a3 > b3 );
int TotalB = ( b1 > a1 ) + ( b2 > a2 ) + ( b3 > a3 );
Topic archived. No new replies allowed.