This repository has been archived on 2026-07-28. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
2025-04-13 21:48:15 +03:00

19 lines
388 B
C++
Executable File

#include <iostream>
#include <iomanip>
#include <cmath>
int main() {
double tmp, arip = 0, squar = 0;
int n = 0;
while (std::cin >> tmp) {
++n;
arip += (tmp - arip) / n;
squar += (tmp * tmp - squar) / n;
}
std::cout << std::setprecision(10);
std::cout << arip << std::endl << std::sqrt(squar - arip * arip) << std::endl;
return 0;
}