C Program to Calculate the average of three numbers

C Program To Calculate average of three numbers

Hey Coders !! Today we will understand the C Program to Calculate the average of three numbers.

There are two methods in which we can calculate the average of three numbers.

What is average of numbers?

In mathematics, the sum of all the numbers divided by the number count is called the average of numbers.

Average of numbers give us the center value that is generated with all the numbers.

1. First Method Of Program-

In this, we will define the value of variables in the program and will not ask the user to define the variables. This is the simplest way of calculating the average.

In this method, we first calculate the sum of the three numbers and then divided the number by the number count. In this the number count is 23.

2. Second Method Of Program-

In this method, we will first ask the users to define the values of variables by themselves. The rest of the method is same for calculating the average of three numbers.

I hope you all have completely understand the C Program To calculate the average of three numbers.

We daily add Multiple Choice Questions for placement preparation questions and technical interview preparation on the Instagram page. Check the Instagram account: Shout Coders

Frequently Asked Questions-

❓ Can we calculate the average of n numbers

Yes, we can calculate the average of n numbers but for that, we should have the knowledge of arrays. Learn Arrays.

❓Can we find the average using functions

Yes, we can use functions to calculate the average of the three numbers

❓Is this program important for exams

Yes, this is one of the simplest programs in programming languages and it also important from the point of an exam.

Recommended Posts –

  1. Introduction to C language
  2. Structure of C program
  3. C Program to add two numbers
  4. C Program to reverse a number
  5. Difference between C and C ++.

Leave a Reply

Your email address will not be published. Required fields are marked *

Close Bitnami banner
Bitnami