eolymp
bolt
Try our new interface for solving problems
Problems

Arithmetical mean

published at 1/30/22, 12:21:03 am

ASGEROFF kod duzdur sadece int yox long double lazimdi.

published at 4/22/24, 12:22:41 pm

include <iostream>

using namespace std; int main () { double n, a=0, c=0,d;

while (cin >> n){

a = a + n;
c++;

d=a/c;} cout.precision(4); cout <<fixed<<d; } //Made from TheBestOne

published at 4/28/24, 8:23:49 pm

include <iostream>

using namespace std; int main () { double n, a = 0, c = 0, d;

while (cin >> n) {

  a = a + n;
  c++;
  d = a / c;
}

cout.precision (4); cout << fixed << d; } //Maded from TheBestOne

published at 4/28/24, 8:23:50 pm

include <iostream>

using namespace std; int main () { double n, a = 0, c = 0, d;

while (cin >> n) {

  a = a + n;
  c++;
  d = a / c;
}

cout.precision (4); cout << fixed << d; } //Maded from TheBestOne