Write a program to accept four positive numbers from user. Calculate and display their sum
and average value.
Please don't text anything except the answer.
This question is not for gaining free points.
This is a request.
Answers
Answered by
0
Answer:
this is written in c language
Explanation:
#include<studio.h>
int main()
{int a,b,c,d,sum;
float avg;
printf("Enter four numbers: ");
scanf("%d%d%d%d",&a,&b,&c,&d);
sum=a+b+c+d;
avg=sum/4;
printf("\n the sum and average of the 4 numbers are : %d and %f", sum,avg);
return 0;
}
Similar questions
Computer Science,
2 months ago
Business Studies,
5 months ago
English,
5 months ago
Physics,
10 months ago
Math,
10 months ago
English,
10 months ago