Question: I need help figuring out the asm on this code. I am a windows user and it has to be in windows, { } not

I need help figuring out the asm on this code. I am a windows user and it has to be in windows,{} not () closed. And it has to be in asm. Please help ASAP.
#include
#include
#include
#include
//declare variables
int soda =2, water =1, beer =3, in =4, inch =6, s, sand, si, total;
string dtype;
using namespace std;
int main()
{
//display a menu
cout <<"-------------------MENU--------------------
";
cout << "Drinks
";
cout <<"\tSoda(s)................................$2
";
cout <<"\tWater(w)...............................$1
";
cout <<"\tBeer(b)................................$3
";
cout << "Sandwiches
";
cout <<"\t6 inches...............................$4
";
cout <<"\t12inches...............................$6
";
//allow user to put in their info
cout << "How many sodas? "; cin >> s;
cout <<"\tWhat kind of drink (Soda(s)/Water(w)/Beer)?"; cin >> dtype;
cout << "How many sandwiches? "; cin >> sand;
cout <<"\tWhat size (6/12 inches)?"; cin >> si;
//compute total bill
//issue, no idea how to compute it
_asm
{
mov ebx, soda;
add ebx, sand;
mov total, ebx;
}
//display total bill
cout <<"\t\tYour total bill is $"<< total << endl;
system("pause");
return 0;
}
/*-----------------------output---------------------------------------
-------------------MENU--------------------
Drinks
Soda(s)..............................$2
Water(w)........................... $1
Beer(b)..............................$3
Sandwiches
6 inches..............................$4
12inches..............................$6
How many sodas? 4
What kind of drink (Soda(s)/Water(w)/Beer)? W
How many sandwiches? 4
What size (6/12 inches)?12
Your total bill is $28
------------------------------------------------------------------------*/

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!