<p>1-      a.write program claculate 10 score sum,avera
ID: 3626624 • Letter: #
Question
<p>1-      a.write program claculate 10 score sum,average and lowest.</p><p>b. write program show this matrix</p>
<p>2     1        +   3    1  =  5   2</p>
<p>6     9            2     0     8    9</p>
<p> </p>
Explanation / Answer
#include<stdio.h>
int main()
{
int scores[10]={1,2,3,4,5,6,7,8,9,10};
int sum=0,i,min;
double avg;
for(i=0; i<10; i++)
sum = sum+scores[i];
avg = (double) sum/10.0;
min = scores[0];
for(i=1; i<10; i++)
{
if(scores[i]<min)
min = scores[i];
}
printf("sum of scores is %d " , sum);
printf("Average of scores is %f " , avg);
printf("lowest of scores is %d " , min);
return 0;
}
#include<stdio.h>
int main()
{
printf("2 1 + 3 1 = 5 2");
printf(" 6 9 2 0 8 9");
return 0;
}
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.