Question is in the attachment.
Thank You. Happy Solving.
Answers
#include<iostream>
using namespace std;
int main(){
int a=75;
a=a%10;
cout<<"a = "<<a;
if(a==9){
cout<<"grade-A"<<\nl;}
else if(a==8){
cout<<"grade-B"<<\n;}
else if(a==7){
cout<<"grade-c"<<\n;
}
else if(a==6){
cout<<"grade-D"<<\n;
}
else{
cout<<"grade- fail<<\n;
}
return 0;
}
Hey there!
Here's your code.
/* program by : Mahnaz
*/
#include <iostream>
using namespace std;
int main()
{
int a = 75;
a = a % 10;
cout << " a = " << a;
if (a == 9)
cout << " grade - A \n";
else if (a == 8)
cout << " grade - B \n";
else if (a == 7)
cout << " grade - C \n";
else if (a == 7)
cout << " grade - D \n";
else
cout << " grade - fail \n";
return 0;
}
______________________________
See the attachment for proper review.
______________________________