double return type in c
snippet in c

double return type in c

user3500

#include<stdio.h>
double cal_per(int, int, int);
int main()
{
  int a = 55, b = 66, c = 77;
  double res;  
  res = cal_per(a,b,c);
  printf("%f\n",res);
  return 0;
}
double cal_per(int a, int b, int c)
{
  double res;
  res = (a+b+c)/300.0;
  res *= 100;
  return res;
}