I'm trying to write a program which calculates the average mark of three tests but I can't figure out how to do the basic math, I know this sounds stupid but I can't seem to find any examples anywhere.
It compiles and runs but when I enter for example 21 for french, 18 for german and 13 for spanish it displays the average 697034459.
using namespace std;
int pass = 15;
int french, german, spanish;
int mark = (french+german+spanish)/3;
cout<<"Enter French mark."; // I don't need the cursor to move
cin>> french; // down.
cout<<"Enter German mark.";
cout<<"Enter Spanish mark.";
cout<<"Your percentage mark was "<< mark <<".\n";
i have never done maths in c++ before and I can't find any relevant help anywhere so any links or other help will be very welcome.