int main()
{
std::string a;
std::cout << "Please enter first name. \n";
std::cin >> a;
std::string b;
std::cout << "Please enter last name. \n";
std::cin >> b;
double c, d, e;
std::cout << "Enter the three test scores. \n";
std::cin >> c;
std::cin >> d;
std::cin >> e;
double sum = c + d + e;
double ave = sum / 3;
std::round(ave);
std::cout << ave;
}
How do I get the average number of c, d, and e while also having the end result where it rounds. Like if the average is 7.58 then it will be
stored as 8, but if it was 6.46, then it will be stored as 6.
I would appreciate any help, please and thank you.