mirror of
https://hub.njuu.cf/TheAlgorithms/C-Plus-Plus.git
synced 2023-10-11 13:05:55 +08:00
formatting source-code for a850308fbada18c0d4b6f9a9cac5c34fc064cbae
This commit is contained in:
parent
a850308fba
commit
227c455792
@ -23,7 +23,8 @@ class stats_computer1 {
|
|||||||
* \param[in] x new data sample
|
* \param[in] x new data sample
|
||||||
*/
|
*/
|
||||||
void new_val(T x) {
|
void new_val(T x) {
|
||||||
if (n == 0) K = x;
|
if (n == 0)
|
||||||
|
K = x;
|
||||||
n++;
|
n++;
|
||||||
T tmp = x - K;
|
T tmp = x - K;
|
||||||
Ex += tmp;
|
Ex += tmp;
|
||||||
@ -160,7 +161,8 @@ int main(int argc, char **argv) {
|
|||||||
|
|
||||||
// check for failure to read input. Happens for
|
// check for failure to read input. Happens for
|
||||||
// non-numeric data
|
// non-numeric data
|
||||||
if (std::cin.fail()) break;
|
if (std::cin.fail())
|
||||||
|
break;
|
||||||
|
|
||||||
stats1.new_val(val);
|
stats1.new_val(val);
|
||||||
stats2.new_val(val);
|
stats2.new_val(val);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user