#include #include int main() { try{ double number(0.0); int count(0); double total(0.0); double valuesinput(0.0); double mean(0.0); std::cout << "How many values do you want to input?\n"; std::cin >> valuesinput; do{ std::cout << "Input a number to see the square of it: " << '\n'; std::cin >> number; if(not std::cin) throw std::exception(); std::cout << "The square of " << number << " is " << number*number << '\n'; total += number*number; std::cout << "The total of all squares so far is " << total << '\n'; ++count; mean= total / count; std::cout << "The arithmetic Mean of these squares are " << mean << '\n'; if(count == valuesinput) break; }while(true); std::cout << "The square root of the Arithmetic Mean (The Root Mean Square) of this set of values is " << std::sqrt(mean) << '\n'; } catch(...) { std::cerr << "***An exception was thrown***\n"; } }