#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
float tugas,uts,uas,rata,hasil;
cout<<"NILAI TUGAS :";
cin>>tugas;
cout<<"NILAI UTS:";
cin>>uts;
cout<<"NILAI UAS:";
cin>>uas;
cout<<endl;
rata=tugas+uts+uas;
hasil=rata/3;
cout<<"RATA-RATA:"<<hasil<<endl;
if(hasil>=80)
cout<<"Nilai= A";
else if(hasil>=65)
cout<<"Nilai= B";
else if(hasil>=50)
cout<<"Nilai= C";
else if(hasil>=35)
cout<<"Nilai= D";
else
cout<<"Nilai= E"<<endl;
cout<<endl;
system("PAUSE");
return EXIT_SUCCESS;
}