Input three digits, three decimal places and the average value of output


#include <iostream>
#include <math.h>
using namespace std;

int main()
{
  float x, y, z;
  cin >> x >> y >> z;
  float avg = (x + y + z) / 3;
  printf("%.3f", avg);
  return 1;
}

Guess you like

Origin www.cnblogs.com/TyranRex/p/12146941.html