Computer Science, asked by naveennaveen14685, 2 months ago

c program Find largest of n numbers Find average n numbers​

Answers

Answered by sakshisn
0

Answer:

C program

#include<stdio.h>

void main( )

{

int n, count = 1;

float x, average, sum = 0;

printf("Enter the value of n?" );

scanf ("%d",&n);

while (count <= n)

Answered by suprathik10
1

Answer:

#include<stdio.h>

int main()

{

printf("\n\n\t\tStudytonight - Best place to learn\n\n\n");

int n, i;

float sum = 0, x;

printf("Enter number of elements: ");

scanf("%d", &n);

printf("\n\n\nEnter %d elements\n\n", n);

for(i = 0; i < n; i++)

{

scanf("%f", &x);

sum += x;

}

printf("\n\n\nAverage of the entered numbers is = %f", (sum/n));

printf("\n\n\n\n\t\t\tCoding is Fun !\n\n\n");

return 0;

}

Similar questions