#include <stdio.h>
int main() {
int x,y,t;
float avg;
int add(int,int);
float AVG(int);
printf("\nEnter 2 no:");
scanf("%d%d",&x,&y);
t=add(x,y);
avg=AVG(t);
printf("\n SUM = %d & AVG = %f",t,avg);
return 0;
}
int add(int x, int y)
{
int t;
t=x+y;
return(t);
}
float AVG(int t)
{
float avg;
avg= t/2.0;
return(avg);
}
To embed this program on your website, copy the following code and paste it into your website's HTML: