Computer Science, asked by mdmerajalam2031, 9 months ago

write a program to find the sum and average of 4 numbers entered by user ?​

Answers

Answered by poddarpriya120
10

  • #include <stdio.h>

  • void main(){

  • int n, i, sum = 0;

  • float avg;

  • for(i = 0; i < 5; i++){

  • scanf("%d", &n);

  • sum += n;

  • }

Hope it is correct.... please mark me as brainlist and Follow me back....✌️

Answered by nishakiran2468
5

Answer:

#include <stdio.h>

#include <stdio.h>void main(){

#include <stdio.h>void main(){int n, i, sum = 0;

#include <stdio.h>void main(){int n, i, sum = 0;float avg;

#include <stdio.h>void main(){int n, i, sum = 0;float avg;for(i = 0; i < 5; i++){

#include <stdio.h>void main(){int n, i, sum = 0;float avg;for(i = 0; i < 5; i++){scanf("%d", &n)

sum += n;

+= n;}

Explanation:

☺️☺️☺️☺️☺️☺️☺️☺️☺️☺️☺️☺️☺️☺️☺️☺️☺️☺️☺️☺️☺️☺️☺️☺️☺️☺️☺️☺️☺️☺️☺️☺️☺️

Similar questions