Ok, I wrote this simple code and it works my only question is when I dont use parentheses around the equation why do I get an incorrect average. I guess I'm trying to understand the method the computer is using to arrive at its answer
#include <iostream>
usingnamespace std;
int main()
{
int v1 = 0;
int v2 = 0;
int v3 = 0;
cout << "Please input scores: \n" << endl;
cin >> v1;
cin >> v2;
cin >> v3;
cout << "Average = " << (v1 + v2 + v3) / (3) << endl;
// If I use the number 1 for all 3 numbers the answer is 1 of course but without the parentheses the answer is 2.
// It seems as though the same answer should result in both cases.
//Please help me understand the computers math process without the parentheses
system("pause");
return 0;
}