Computer Science, asked by saanjh9441, 7 months ago

Write a program to find average of three numbers.

Answers

Answered by udayupadhyaya71
18

Explanation:

#include <stdio.h>

int main()

{

int a,b,c;

float avg;

printf("\tEnter Three Numbers\n");

printf("--------------------------------\n");

printf("Enter First Number : ");

scanf("%d", &a);

printf("\nEnter Second Number : ");

scanf("%d",&b);

printf("\nEnter Third Number : ");

scanf("%d",&c);

printf("--------------------------------\n");

/* To find average*/

avg=a+b+c/3.0;

printf("\nAverage of Three Numbers : %f",avg);

return 0;

}

please make me brilianist

Answered by Anonymous
15

Answer:

To compute the average of three given numbers using C

#include <stdio.h>

#include <conio.h>

void main()

int n1,n2,n3;

float avg;

printf("\nENTER THREE NUMBERS: " );

scanf("%d %d %d",&n1,&n2,&n3);

avg=(n1+n2+n3)/3;

Plz Mark me as BRAINLIEST

Similar questions