एक प्रोग्राम डिज़ाइन करें जो पाँच संख्याओं के औसत की गणना करता है
Algorithm:
1. Start
2. Declare and initialize variables - num1, num2, num3, num4, num5 and avg.
3. Read values of num1, num2, num3, num4 and num5.
4. Add all the numbers and store the result in a variable sum.
5. Calculate the average by dividing the sum with the total number of values (i.e., 5).
6. Print the result as the average of the input numbers.
7. Stop.

Program:

#include<stdio.h>
int main()
{
    float num1, num2, num3, num4, num5, avg;
    float sum = 0;
    
    printf("Enter 5 numbers: ");
    scanf("%f %f %f %f %f",&num1, &num2, &num3, &num4, &num5);
    
    sum = num1 + num2 + num3 + num4 + num5;
    avg = sum / 5;
    
    printf("\nAverage of the numbers is %.2f", avg);
    return 0;
}