Upload files to "ex1A_mean_values"
This commit is contained in:
commit
6be81d2d73
3 changed files with 88 additions and 0 deletions
23
ex1A_mean_values/means.h
Normal file
23
ex1A_mean_values/means.h
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
#pragma once
|
||||
#include <vector>
|
||||
|
||||
/**
|
||||
This function calculates arithmetic mean, geometric mean and harmonic mean of three integers.
|
||||
@param[in] a first integer
|
||||
@param[in] b second integer
|
||||
@param[in] c third integer
|
||||
@param[out] am arithmetic mean
|
||||
@param[out] gm geometric mean
|
||||
@param[out] hm harmonic mean
|
||||
*/
|
||||
void calculate_means(int a, int b, int c, double &am, double &gm, double &hm);
|
||||
|
||||
/**
|
||||
This function calculates arithmetic mean, geometric mean and harmonic mean of an integer vector.
|
||||
@param[in] numbers vector containing integers
|
||||
@param[out] am arithmetic mean
|
||||
@param[out] gm geometric mean
|
||||
@param[out] hm harmonic mean
|
||||
*/
|
||||
void calculate_means(std::vector<int> numbers, double &am, double &gm, double &hm);
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue