Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Go to godbolt.org and copy the below C++ program into the compiler and convert to x86 code. Copy the x86 instructions into a document and

Go to godbolt.org

and copy the below C++ program into the compiler and convert to x86 code.

Copy the x86 instructions into a document and add comments explaining the code of x86 version.

Ignore the constructor aspects of x86.

You should have at least 25 lines of explanation for the converted x86 code.

#include

#include

#include

#include

using namespace std;

float const LABOR = 4.15;

float const TAX = 0.085;

int main() {

string customers_name;

float room_length, rooms_width , price_sq_ft , discount, size, cost , labor_cost, installed_cost, discount_price, sub_total, taxes, final_cost ;

// Input Section

cout << "Customer's' Name : ";

getline (cin,customers_name);

cout << "Room's Length : ";

cin >> room_length;

cout << "Room's Width : ";

cin >> rooms_width;

cout << "Price / Sq Ft : ";

cin >> price_sq_ft;

cout << "Discount Rate : ";

cin >> discount;

// Processing Section

size = ceil(room_length * rooms_width);

cost = price_sq_ft * size;

labor_cost = LABOR * size;

installed_cost = cost + labor_cost;

discount_price = installed_cost/discount;

sub_total = installed_cost - discount_price;

taxes = sub_total * TAX;

final_cost = sub_total + taxes;

// Output Section

cout<

cout << " "<

cout << "Welcome to Passaic County Carpeting Company"<

cout << " "<

cout << "Customer information:"<

cout << "\tCustomer Name:""\t\t"<

cout << "\tCarpet Size:""\t"<

cout << "Charges:"<

cout << "\tCarpet Cost: @ $"<

cout << "\tLabor Cost: @ $"<

cout << "\tInstalled Price:\t\t$"<

cout << "\tDiscount:\t\t\t$"<

cout << " \t\t __________"<

cout << "\tSubTotal: \t\t$"<

cout << "\tTaxes: \t\t$"<

cout << "\tTotal Cost: \t\t$"<

cout <

return 0;

}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions