• 100% Satisfaction Guarantee

ATLPROG, Computer Software Engineer
Category: Programming
Satisfied Customers: 8301
Experience:  MS in IT.Several years of programming experience in Java C++ C C# Python VB Javascript HTML
ATLPROG is online now

using the for statement c++ need help

Resolved Question:

using the for statement c++ need help
Submitted: 1 year ago.
Category: Programming
Expert:  ATLPROG replied 1 year ago.

ATLPROG :

hi

ATLPROG :

Welcome

Customer:

im doing the for statement

ATLPROG :

How can I help]

Customer:

one sec let me upload the assignment

ATLPROG :

ok

Customer:

Purpose: Provide ACME.COM an interactive program that helps the sales department to determine the pricing of products sold to customers.

The only data provided by the user is customer name, product name, and product price. Sale Tax will be based upon a 7% sale tax rate provided for the user. The program's main function will be to calculate

the cost of from 1 to 15 of these products the tax on the sale, and total amount due.

VARIABLE DICTIONARY

VARIABLES TYPE REPRESENT

name_of_product String Product Name

price_of_product Double Price of product

reply String Yes or No to run program again

price_quotation_max Int Price Quotation will not exceed 15

total_price Double Total Price

sales_tax Int Sales Tax

company_name String Customers Name

number_of_items Int Number of Items

*/

#include

<iostream>

#include

<string>

#include

<iomanip>

using

namespace

std;

int

i, x, price_quotation_max, number_of_items, total_tax;

double

a, b, c, d, total_price, price_of_product, cost_of_items, sales_tax, total_taxes;

void

setup();

void

void

input();

void

calculations ();

int

main ()

{

setup();

input();

calculations();

/*cout.setf(ios::fixed, ios::floatfield);

cout.setf(ios::showpoint);

cout.precision(3);

a = 3.4;

b =(NNN) NNN-NNNN

c = 0.12;

d = 1.9876;*/

/*cout<< setw(6) << a << endl;

cout<< setw(6) << b << endl;

cout<< setw(6) << c << endl;

cout<< setw(6) << d << endl;*/

/*for(i = 1; i <= 20; i++)

{

cout.width(6);

cout << i << endl;

}*/

cout<<

"Would you like to prepare another chart? (YES/NO)"

<<endl;

cout<<

"Press<ENTER>to continue:"

;

) {

input ();

calculations ();

cout<<

"Would you like to prepare another chart? (YES/NO)"

<<endl;

cout<<

"Press<ENTER>to continue:"

;

}

//end loop

return

0;

system (

"pause"

);

}

//Setup Start

void

setup ()

{

sales_tax = 7;

price_quotation_max = 15 ;

}

//Setup End

void

{

cout<<

"Would you like to prepare another chart? (YES/NO)"

<<endl;

cout<<

"Press<ENTER>to continue:"

;

cout<<

" PRICE QUOTATION"

<<endl;

}

//Input Start

void

input ()

{

cout<<

" PREPARED FOR:"

;cin>>company_name;

cout<<

" PRODUCT NAME:"

;cin>>name_of_product;

cout<<

" PRICE OF PRODUCT:"

;cin>>price_of_product;

cout<<

""

<<endl;

cout<<

"Number of Items"<<" Cost"<<" Tax"<<" Total Price"

<<endl;

}

//End Input

//Calculations/Output

void

calculations ()

{

for

(x = 1; x <= price_quotation_max; x = x + 1)

{

number_of_items = x + 0;

cost_of_items = price_of_product * x ;

total_taxes = cost_of_items * sales_tax ;

cout<<number_of_items<< cost_of_items<< total_taxes<< total_price<<endl;

"\n"

;

}

}

ATLPROG :

Customer:

were are just learning how to use the for statement

ATLPROG :

ok

ATLPROG :

going through it

Customer:

all we have been taught is the while and for loop

ATLPROG :

ok

ATLPROG :

how soon do you need this ?

Customer:

by tonight

Customer:

9:23 est here

ATLPROG :

so in 2 hrs from now ?

Customer:

2 hours you said

Customer:

do i just stay in chat with you

ATLPROG :

hang on

ATLPROG :

let me see if I can do it this soon

Customer:

im here if you need anything from me

ATLPROG :

yep, still working on it

Customer:

k np

ATLPROG :

k

Customer:

you still here it said you left chat lol

ATLPROG :

yes I am here

ATLPROG :

dont worry

Customer:

k cool

ATLPROG :

k

ATLPROG :

let me sned what I have

ATLPROG :

ATLPROG :

let me know if it looks ok

Customer:

k

Customer:

all the numbers are going to the left

ATLPROG :

are you running the file I gave you ?

Customer:

yup

ATLPROG :

it is runing just fine here

ATLPROG :

I can send a screenshot

Customer:

one sec

ATLPROG :

Customer:

k all set

ATLPROG :

cool

ATLPROG :

Please click the Green accept button if you think my answer helped, so that I get credited for the time spent. I would obviously continue to help you if you have any further questions.

ATLPROG :

Customer:

ty

ATLPROG :

ywc

ATLPROG, Computer Software Engineer
Category: Programming
Satisfied Customers: 8301
Experience: MS in IT.Several years of programming experience in Java C++ C C# Python VB Javascript HTML

Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.

What Customers are Saying:

• My Expert answered my question promptly and he resolved the issue totally. This is a great service. I am so glad I found it I will definitely use the service again if needed. One Happy Customer New York
< Last | Next >
• My Expert answered my question promptly and he resolved the issue totally. This is a great service. I am so glad I found it I will definitely use the service again if needed. One Happy Customer New York
• Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
• This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!! Alex Los Angeles, CA
• Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult. GP Hesperia, CA
• I couldn't be more satisfied! This is the site I will always come to when I need a second opinion. Justin Kernersville, NC
• Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around. Esther Woodstock, NY
• Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know. Robin Elkton, Maryland

• ATLPROG

Satisfied Customers:

7463
MS in IT.Several years of programming experience in Java C++ C C# Python VB Javascript HTML
< Last | Next >

ATLPROG

Satisfied Customers:

7463

MS in IT.Several years of programming experience in Java C++ C C# Python VB Javascript HTML

LogicPro

Satisfied Customers:

5603

Expert in C, C++, Java, DOT NET, Python, HTML, Javascript, Design.

Satisfied Customers:

1158

Good knowledge of OOP principles. 3+ years of programming experience with Java and C++. Sun Certified Java Programmer 5.0.

lifesaver

Satisfied Customers:

950

Several years of intensive programming and application development experience in various platforms.

ehabtutor

Satisfied Customers:

864

Bachelor of computer science, 5+ years experience in software development, software company owner

Raj

Satisfied Customers:

860

BE CS, 4+ Experience in Programming and Database (ERP)