Answers for "double return type in c"

C
1

double return type in 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;
}
Posted by: Guest on May-17-2020

Code answers related to "C"

Browse Popular Code Answers by Language