Translate the following C/C++ code in Assembly x86: #include int main() { char grade; std::cout << "Insert your grade:

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Translate the following C/C++ code in Assembly x86: #include int main() { char grade; std::cout << "Insert your grade:

Post by answerhappygod »

Translate the following C/C++ code in Assembly
x86:

#include
int main()
{
char grade;
std::cout << "Insert your grade: ";
std::cin >> grade;
switch(grade)
{
case 'A':
std::cout << "A: Excellent!" << std::endl;
break;
case 'B':
std::cout << "B: Good!" << std::endl;
break;
case 'C':
std::cout << "C: It is sufficient!" << std::endl;
break;
case 'D':
std::cout << "D: Poor result!" << std::endl;
break;
case 'F':
std::cout << "F: Insufficient!" << std::endl;
break;
default:
std::cout << "Grade not recognized" << std::endl;
break;
}
std::cout << "See you!" << std::endl;
return 0;
}
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply