My c program

#include
#include
int main(){
float A,c,b,ba,e,i,m,p,R,pg,cg,mg,bg,bag,eg,ig,Ag;

{
   printf(" Enter Bangla marks":");
    scanf("%f",&ba); 
    if(ba<=32) printf("You Have failed😥");
    else if ((ba>=33)&&(ba<40)) printf("You have got D = GPA-1.00");
    else if ((ba>=40)&&(ba<50))printf("You have got C = GPA-2.00");
    else if ((ba>=50)&&(ba<60)) printf("You have got B = GPA-3.00");
    else if ((ba>=60)&&(ba<70)) printf("You have got A- = GPA-3.50");
     else if ((ba>=70)&&(ba<80)) printf("You have got A = GPA-4.00");
   else printf("You have got A+ = GPA-5.00 ");
  
}{
    printf(" vEnter English marks":");
    scanf("%f",&e); 
    if(e<=32) printf("You Have failed😥");
    else if ((e>=33)&&(e<40)) printf("You have got D = GPA-1.00");
    else if ((e>=40)&&(e<50))printf("You have got C = GPA-2.00");
    else if ((e>=50)&&(e<60)) printf("You have got B = GPA-3.00");
    else if ((e>=60)&&(e<70)) printf("You have got A- = GPA-3.50");
     else if ((e>=70)&&(e<80)) printf("You have got A = GPA-4.00");
   else printf("You have got A+ = GPA-5.00 ");
  
}
{
    printf(" vEnter ICT marks":");
    scanf("%f",&i); 
    if(i<=32) printf("You Have failed😥");
    else if ((i>=33)&&(i<40)) printf("You have got D = GPA-1.00");
    else if ((i>=40)&&(i<50))printf("You have got C = GPA-2.00");
    else if ((i>=50)&&(i<60)) printf("You have got B = GPA-3.00");
    else if ((i>=60)&&(i<70)) printf("You have got A- = GPA-3.50");
     else if ((i>=70)&&(i<80)) printf("You have got A = GPA-4.00");
   else printf("You have got A+ = GPA-5.00 ");
  
}
{
    printf(" vEnter physics marks":");
    scanf("%f",&p); 
    if(p<=32) printf("You Have failed😥");
    else if ((p>=33)&&(p<40)) printf("You have got D = GPA-1.00");
    else if ((p>=40)&&(p<50))printf("You have got C = GPA-2.00");
    else if ((p>=50)&&(p<60)) printf("You have got B = GPA-3.00");
    else if ((p>=60)&&(p<70)) printf("You have got A- = GPA-3.50");
     else if ((p>=70)&&(p<80)) printf("You have got A = GPA-4.00");
   else printf("You have got A+ = GPA-5.00 ");
  
}
    {
    printf(" vEnter Chemistry marks":");
    scanf("%f",&c); 
    if(c<=32) printf("You Have failed😥");
    else if ((c>=33)&&(c<40)) printf("You have got D = GPA-1.00");
    else if ((c>=40)&&(c<50))printf("You have got C = GPA-2.00");
    else if ((c>=50)&&(c<60)) printf("You have got B = GPA-3.00");
    else if ((c>=60)&&(c<70)) printf("You have got A- = GPA-3.50");
     else if ((c>=70)&&(c<80)) printf("You have got A = GPA-4.00");
   else printf("You have got A+ = GPA-5.00 ");
  
}
    {
    printf(" vEnter Math marks":");
    scanf("%f",&m); 
    if(m<=32) printf("You Have failed😥");
    else if ((m>=33)&&(m<40)) printf("You have got D = GPA-1.00");
    else if ((m>=40)&&(m<50))printf("You have got C = GPA-2.00");
    else if ((m>=50)&&(m<60)) printf("You have got B = GPA-3.00");
    else if ((m>=60)&&(m<70)) printf("You have got A- = GPA-3.50");
     else if ((m>=70)&&(m<80)) printf("You have got A = GPA-4.00");
   else printf("You have got A+ = GPA-5.00 ");
  
}
    {
    printf(" vEnter Biology marks":");
    scanf("%f",&b); 
    if(b<=32) printf("You Have failed😥");
    else if ((b>=33)&&(b<40)) printf("You have got D = GPA-1.00");
    else if ((b>=40)&&(b<50))printf("You have got C = GPA-2.00");
    else if ((b>=50)&&(b<60)) printf("You have got B = GPA-3.00");
    else if ((b>=60)&&(b<70)) printf("You have got A- = GPA-3.50");
     else if ((b>=70)&&(b<80)) printf("You have got A = GPA-4.00");
   else printf("You have got A+ = GPA-5.00 ");
  
}
    {
            printf(" va-------Notice at Top -----");
            printf(" ---Note Your Each subject GPA---v");
           
        }
  { printf(" vvaEnter your all ( Bangla, English, ICT, Physics, Chemistry, Math, Biology )  GPA:");
        scanf("%f%f%f%f%f%f%f",&bag,&eg,&ig,&pg,&cg,&mg,&bg);    
  }
   
   
         {   
        Ag=(pg+cg+mg+bg+bag+eg+ig)/6; 
            printf(" --- Your GPA is: %f",Ag);
    }  
 
   
    R=(p+c+m+b+ba+e+i);
    printf(" It is your total Marks:%.2f",R);
    A=(m+p+c+b+ba+e+i)/7;
    printf(" It is your Average Marks:%.2f",A);
    getch();
}

Post a Comment

0 Comments