#include "CS35lib.h"


int main ()
{
   int counter, i, number;
   double score[5], highest_sco, sum;
   char Y_or_N;
   
   cout<<"You had 5 quizzes this semester. Enter your scores: \n";
   for (counter=1; counter <= 5; counter++)
   {
      cout<<"Quiz "<<counter<<":";
      cin>>score[counter];
   }
   cout<<endl<<endl;
   cout<<"Here are your scores: \n\n";
   highest_sco = 0;
   for (counter=1; counter <= 4; counter++)
   {
      cout<<"Quiz "<<counter<<": ";
      cout<<score[counter];
      if ( score[counter] > highest_sco)
      {
      	highest_sco = score[counter];
      }
      cout<<"\n";
   }
   cout<<"Do you want to correct any of these? ";
   cin>>Y_or_N;
   if ((Y_or_N == 'Y') || (Y_or_N == 'y')) 
   {
      cout<<"Which quiz number? ";
      cin>>number;
      cout<<"That score is presently "<<score[number]<<".";
      cout<<"  What should it be? ";
      cin>>score[number];
      cout<<endl<<endl;
   	for (counter=1; counter <= 5; counter++)
      {
            cout<<"Quiz "<<counter<<": ";
            cout<<score[counter];
            if ( score[counter] > highest_sco)
            {
         	highest_sco = score[counter];
            }
            cout<<"\n";
      }
    } 
   // else
    //{
    	
    //}
    cout<<"\n\n";
    cout<<"Your highest score is "<< highest_sco<<". \n";
       //cout<<"Your average is "<<
   
   
   
   
   
   return 0;
   
}
   
