double return type in c

C
#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;
}
Source

Also in C: