Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

our assignment IS to write a complete++ program to pemorm an anaryss or exam sco

ID: 3889703 • Letter: O

Question

our assignment IS to write a complete++ program to pemorm an anaryss or exam scores. I ne input to tne program 's a sequence or N exam scores, followed by-1. Example: 98 73 81 84 90 17 Your program may assume there is at least one exam score in the input sequence,i.e.N>0.Also assume the exam scores are valid, ie in the range 0.100, inclusive. Finally, assume the sequence is always followed by a -1 to denote the end of the sequence do not include the-1 in the analysis The output from your program is an analysis of the exam scores: the # of scores, average, max, min, and a histogram of A, B, C, D, and F scores (assuming a standard 90-80-70-60 scale). For example, given the input sequence shown above, the output from your program should be the following Exam Score Analysis # cores: 7 Average: 71.1429 Max: 98 Min: 17 90-100: 2 80-89: 2 70-79: 1 60-69: 0

Explanation / Answer

//Please see the code below do thumbs up if you like the solution

#include <iostream>
#include<conio.h>
using namespace std;

int main()
{
   int Min=9999;
   int Max=0;
   int nintyHundread=0;
   int eigthy=0;
   int seventy=0;
   int sixty=0;
   int lessSixty=0;
   int marks=0;
   double Total=0;
   int count=0;
   double avg=0;

   cout<<"Enter the marks of the students : "<<endl;
   while(marks!=-1)
   {
       cin>>marks;
       if(marks!=-1)
       {
           Total+=marks;
           if(Min>marks)
           {
               Min=marks;
           }
           if(Max<marks)
           {
               Max=marks;  
           }

           if(marks>=90 && marks <=100)
           {
               nintyHundread++;
           }

           if(marks>=80 && marks <=89)
           {
               eigthy++;
           }
          
           if(marks>=70 && marks <=79)
           {
               seventy++;
           }
          
           if(marks>=60 && marks <=69)
           {
               sixty++;
           }

           if(marks<60)
           {
               lessSixty++;
           }
          
           count++;
       }

      
   }

   avg=Total/count;


   cout<<"** Score Analysis **"<<endl;
   cout<<"# score: "<<count<<endl;
   cout<<"Average: "<<avg<<endl;
   cout<<"Max: "<<Max<<endl;
   cout<<"Min: "<<Min<<endl;
   cout<<"90-100: "<<nintyHundread<<endl;
   cout<<"80-89: "<<eigthy<<endl;
   cout<<"70-79: "<<seventy<<endl;
   cout<<"60-69: "<<sixty<<endl;
   cout<<"<60: "<<lessSixty<<endl;
   cout<<"**END**"<<endl;
   getch();

}

OUTPUT:

Enter the marks of the students :
55
98
73
81
84
90
17
-1
** Score Analysis **
# score: 7
Average: 71.1429
Max: 98
Min: 17
90-100: 2
80-89: 2
70-79: 1
60-69: 0
<60: 2
**END**