I have this simple program...that takes 4 integers and prints out the average

Code:#include <stdio.h> int AVERAGE(int num1, int num2, int num3, int num4); float OUTPUT(float output); int main(void){ int a,b,c,d,x, avr, out; printf("Please enter four integers : "); scanf("%d%d%d%d",&a,&b,&c,&d ); avr=AVERAGE(a,b,c,d); OUTPUT(avr); exit(0); } int AVERAGE(int num1, int num2, int num3, int num4){ float result; result = (num1 + num2+ num3 + num4)/4; return(result); } float OUTPUT(float output){ printf("Average of the 4 integers is %5.2f \n", output); }

But for some reason i'm losing decimals. If for example i input 1, 2,3 and 4

out put should be 2.5 but i get 2