I have the following function that should return an average of l1- l7. However, it seems to only return an integer. Why is it doing this, and how do I make it return a float rounded to 2 decimal places?
Snippet:
int lab_avg(int l1,int l2,int l3,int l4,int l5,int l6,int l7) {
float ttl;
ttl = l1 + l2 +l3 +l4 +l5 +l6 +l7;
return ttl / 7.0;
}