I'm barely starting C so to find the average of 3 numbers would it go something like

x + y + z = n/3

I don't know what the codes would be to get the input fields of x, y, z, and how to put an attribute on n that it is a summation of x, y, and z.