About Me

About Me : I have been working as a Software Engineer for various international companies for four years.Currently, I am working as a full stack Javascript developer in Petronas(Malaysia).

Skills

Skills • Javascript •Typescript •Python •C •Java •ReactJs • Redux • VueJs • NestJs • React Testing Library • Django• PostgreSQL • MySQL • NodeJs • Git • Docker • Jira • Visual Studio Code • Slack

রবিবার, ৬ এপ্রিল, ২০১৪

UVA 11777 Automate the Grades

#include <iostream>
#include <cstdio>
#include <algorithm>

using namespace std;

int main()
{
   int t1,i,t2,t3,final_at,ct1,ct2,ct3,a[3],test,total;
   scanf("%d",&test);
      for(i=1;i<=test;i++){
            total=0;
        scanf("%d %d %d %d %d %d %d",&t1,&t2,&t3,&final_at,&ct1,&ct2,&ct3);
        a[0]=ct1;a[1]=ct2;a[2]=ct3;
         sort(a,a+3);

         total=t1+t2+t3+final_at+(a[1]+a[2])/2;
         if(total>=90)
            printf("Case %d: A\n",i);
         else if(total>=80&&total<90)
           printf("Case %d: B\n",i);
         else if(total>=70&&total<80)
            printf("Case %d: C\n",i);
         else if(total>=60&&total<70)
           printf("Case %d: D\n",i);
         else if(total<60)
          printf("Case %d: F\n",i);

      }

    return 0;
}

কোন মন্তব্য নেই:

একটি মন্তব্য পোস্ট করুন