In: Computer Science
in c++ Write a program that can calculate the arithmetic mean, the geometric mean, and the harmonic mean of a set of five numbers. •The program should ask the user to enter fiver numbers, calculate the means, and print all the data to a text file. The program should output the expected results.•Example: The text file should read: For the set of numbers {1,2,3}. The arithmetic mean is 2, the geometric mean is about 1.82, and the harmonic mean is about 1.64•The screen should display: Expected: arithmetic mean: 2, geometric mean 1.82, harmonic mean 1.64
Here is the answer for your question in C++ Programming Language.
Kindly upvote if you find the answer helpful.
#######################################################################
CODE :
#include<iostream> using namespace std; int main(){ } |
###################################################################
SCREENSHOTS :
Please see the screenshots of the code below for the indentations of the code.
###################################################################
OUTPUT :
Text File output
Any doubts regarding this can be explained with pleasure :)