write a program to find the sum and average of 4 numbers entered by user ?
Answers
Answered by
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
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