UVA 11777 - Automate the Grades UVA • Aug 31, 2020 Problem PDFSolution:#include int main() { int t1,t2,f,at,ct1,ct2,ct3,c,d,n,i; while(scanf("%d",&n)==1) { for(i=1;i<=n;i++) { scanf("%d%d%d%d%d%d%d",&t1,&t2,&f,&at,&ct1,&ct2,&ct3); if(ct1<=ct2 && ct1<=ct3) c=(ct2+ct3)/2; else if(ct2<=ct1 && ct2<=ct3) c=(ct1+ct3)/2; else if(ct3<=ct1 && ct3<=ct2) c=(ct1+ct2)/2; d=t1+t2+f+at+c; if(d>=90) printf("Case %d: A\n",i); else if(d>=80) printf("Case %d: B\n",i); else if(d>=70) printf("Case %d: C\n",i); else if(d>=60) printf("Case %d: D\n",i); else if(d<60) printf("Case %d: F\n",i); } } return 0; } https://github.com/Shipu/OnlineJudgeProblemSolutionWithCPlusPlus/tree/master/uva/11777/11777.cpp Tags UVA Competitive Programming Shipu Ahamed Recommended for you UVA UVA 913 - Joana and the Odd Numbers 4 years ago • 1 min read UVA UVA 871 - Counting Cells in a Blob 4 years ago • 3 min read UVA UVA 866 - Intersecting Line Segments 4 years ago • 3 min read