//OrinTill Qimid CS1A Chapter 4, P. 294, 4
//
/**************************************************************
 *  CALCULATE GRADE
 * 
 * ____________________________________________________________
 * This program will calculate a letter grade for each students
 * ____________________________________________________________
 * INPUT
 * name : name of the students.
 * score : score for each students.
 * OUTPUT
 * grade : grade for each students
 **************************************************************/
#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;



int main() 
{
   
    string names [5];
    string grade [5];
    double score [5];
    for (int i = 0; i < 5; i++)
    {
        
        cout<<"please enter name for student"<<endl;
        cin>>names[i];
        cout<<"please enter score for student "<<names[i]<<endl;
        cin>>score[i];
        if (score[i]>=90)
        {
            grade[i] = 'A';

            
        }
        else if (score[i]>=80)
            {
               grade[i] = 'B';
            }
        else if (score[i]>=70)
            {
                grade[i] = 'C';
            }
        else if (score[i]>=60)
            {
                grade[i] = 'D';
            }
        else
        {
            grade [i] = 'F';
        }
        
    }
    for (int s = 0; s < 5; s++)
    {
        cout<<"Grade for student "<<names[s]<<endl;
        cout<<grade[s]<<endl;

    }
    
    

    return 0;
}

