is there difference between these two codes ? and if there is which is the more professional ? or write the the best than them
float grade ; cout<<"please enter your grade " ; cin>>grade ; if(grade >=50 && grade <=100) { if (grade<=59) { cout<<"F \n" ; } else if (grade<=69) { cout<<"D \n" ; } else if (grade<=79) {cout<<"C \n" ; } else if (grade<=89) {cout<<"B \n"; } else if (grade<100) { cout<<"A \n" ; } else if (grade=100) {cout<<"Perfect \n" ; } } else if (grade <50 && grade >=0) { cout<<"sorry you have not passed \n " ; } else {cout<<"Error \n";} --------------------------------------------------------------------- if (grade >=50&&grade<=59) { cout<<"F \n" ; } else if (grade>=60 &&grade<=69) { cout<<"D \n" ; } else if ( grade>=70 && grade<=79) {cout<<"C \n" ; } else if (grade>=80 && grade<=89) {cout<<"B \n"; } else if (grade>=90 && grade<100) { cout<<"A \n" ; } else if (grade=100) {cout<<"Perfect \n" ; } else if (grade <50 && grade >=0) { cout<<"sorry you have not passed \n " ;} else {cout<<"Error \n";}