# C Program to find the average of three numbers

Write a C program in the C programming language to find the average of three numbers. Below is the solution of the program –

```/*C program to find the average of three numbers*/
#include<stdio.h>
void main()
{
float a,b,c,av=0;

printf("Enter any three numbers to find their average \n");
scanf("%f%f%f",&a,&b,&c);

av=(a+b+c)/3.0;

printf("\n Average of three numbers is \t %f",av);
getch();
}```

Input-
Enter three numbers to find their average – 23   64   33

Output –
Average of three numbers is – 40.000

#### 11 thoughts on “C Program to find the average of three numbers”

1. vishwas rao says:

y d usage of/t is necessary

1. SAHIL KUMAR says:

/t is used to give a TAB space(1 tab space= 4 times space bar)

2. Pranoy Shit says:

#include is missing…

3. Pranoy Shit says:

include conio.h missing

4. Jubilant Ojika says:

#include. . . . . .1 void main (). . . . . . . . . . .2 {. . . . . . . . . . . . . . . . . . . . . 3 int x, y, z, ave; . . . . . . . 4 scanf(“%d %d %d”, &x, &y, &z); . . . . . . . . . . . . . . 5 ave = (5+2+9)/3; . . . . .6 printf(“the average is =%d”, ave); . . . . . . . . . . . . 7 }

5. Upendra Sing says:

This is awesome result. Thanks

6. Puja Sen says:

I
t helps me.Thank u.

7. Surya says:

\t ?what is the usage

8. jyothsna rani says:

thank you for information

9. Gabbar says:

Thanks for this help