C Program Example | C Program to Find the Average of Three Numbers

आज इस पोस्ट में हम C Language का उपयोग करते हुवे हम किन्ही 3 Numbers का Average निकालने वाला प्रोग्राम बनाएंगे |

C Program to Find the Average of Three Numbers
C Program to Find the Average of Three Numbers

C Program to Find the Average of Three Numbers

Algorithm -:

  1. Program Start

2) Declaration of variable

3) Assign the value in variable

4) Run arithmetic operator

5) Print output(Answer)

6) Program End.

Code For Program

#include<stdio.h>
#include<conio.h>
void main()
{
   int a,b,c;
   float avg;
   printf("Enter three number");
   scanf("%d %d %d",&a,&b,&c);
   avg=a+b+c/3.0;
   printf("Average is : %f",avg);
   getch();
}

Output -:

Enter three number
10
15
60
Average is : 45.000000

Hey there, welcome to Master Programming. I am Jeetu Sahu , A Web Developer | Computer Engineer | Passionate about Coding, Competitive Programming and Blogging

Leave a Comment