View Code of Problem 47

#include <stdio.h>
int main()
{
  int a,b,c;
  int sum = 0;//三个整数的和
  int pro = 0;//三个数的乘积
  double avg = 0;//三个数的平均数
  scanf("%d%d%d",&a,&b,&c);
  sum = a + b + c;
  pro = a * b * c;
  avg = sum /3.0;
  printf("%d %d %.2lf",sum,pro,avg);
  return 0;
}

Double click to view unformatted code.


Back to problem 47