Login|Contact Us
Question and Answer

Programming

Ask a Programming Question, Get an Answer ASAP!

  • Ask A Question
  • Browse Answers
  • Meet The Experts
  • How JustAnswer Works

using the for statement c++ need help

 
ATLPROG's Avatar
  • Answered by:ATLPROG
  • Computer Software Engineer
  • Positive Feedback: 99.8 %
  • Accepted Answers: 7386
Verified Expert
in Programming

Recent Feedback

Positive
nice
Positive
ATL Prog is the man! Great support.
Positive
A++++++ with JAVA again!! Thanks for the great help and service!
Positive
Very helpful yet again
Positive
This is just what I needed and ATLPROG completed it quickly.
Positive
Very fast, excellent and the best in this field. Recommended!
Positive
So Smart and have Great Knowledge
Positive
Thanks man. Compared to what I had coded up, I started out good, but then took...
Positive
I cant afford much more than I have already paid, but let me know if you want...
Positive
Thanks again and again

Customer Question

using the for statement c++ need help

 

Optional Information:
Language (or Software): C++

Already Tried:
everything

Submitted: 376 days and 12 hours ago.
Category: Programming
Value: $55
Status: CLOSED

Accepted Answer

Picture
Expert:  ATLPROG replied376 days and 12 hours 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;

string company_name, reply, name_of_product;

double

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

void

setup();

void

heading();

void

input();

void

calculations ();

 

int

main ()

{

setup();

heading();

input();

calculations();

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

cout.setf(ios::showpoint);

cout.precision(3);

a = 3.4;

b = XXX.XXXX;

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:"

;

cin >> reply;

while (reply == "y"

) {

input ();

heading();

calculations ();

cout<<

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

<<endl;

cout<<

"Press<ENTER>to continue:"

;

cin>>reply;

}

//end loop

return

0;

system (

"pause"

);

}

//Setup Start

void

setup ()

{

sales_tax = 7;

price_quotation_max = 15 ;

}

//Setup End

//Heading Start

void

heading ()

{

cout<<

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

<<endl;

cout<<

"Press<ENTER>to continue:"

;

cin >> reply;

cout<<

" PRICE QUOTATION"

<<endl;

}

//Heading End

 

 

 

 

//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 :

Can you please send me the files you have been working with ?Can you please go to www.wikisend.com and upload your file ? Once you do that you will get a page that has the "File ID" and "Download Link". Copy the "Download Link" or "File ID" and please paste it in your reply here.

Customer :

http://wikisend.com/download/517268/assign6.cpp

Customer :

were are just learning how to use the for statement

ATLPROG :

ok

Customer :

Full Size Image

ATLPROG :

going through it

Customer :

Full Size Image

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 :

Download assign6.cpp

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 :

Screenshot Download

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 :

Please start your question text with "For ATLProg Only" to request me again, next time you need help! http://www.justanswer.com/computer/expert-atlprog/ - Please bookmark this link to ask new question.

Customer :

ty

ATLPROG :

ywc

Expert TypeComputer Software Engineer
Category: Programming
Pos. Feedback: 99.8 %
Accepts: 7386
Answered: 5/8/2012

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

Ask this Expert a Question >
 
Tweet

4 Programmers are Online Right Now

Ask Your Question Now
Programming Questions Date Submitted
Microsoft Visual Basic 2010 Programming Exercise 5/16/2013
I am programming and auto reply macro and Outlook 10 that is 5/16/2013
Hello. I really need help with C Programming. I need a program 5/15/2013
I need to make the submit button bigger 5/15/2013
"For Jatechexpert" Part 1Programming Exercise 2—Calories 5/14/2013
INSTRUCTIONS: VERY IMPORTANT, THIS IS TO BE DONE USING MICROSOFT 5/13/2013
I have a JavaScript programming question. I have a form and 5/13/2013
Need a java programming to fulfill the following requirements: 1. 5/13/2013
I. Overview: Welcome to the CIT216 Practice Final 5/13/2013
Please help with this project https://www.dropbox.com/s/vs 5/12/2013
RSS
Next 10 >
Ask A Programmer
Type Your Programming Question Here...
characters left:

Top Programming Experts

See More Programmers

JustAnswer in the News

Nbc
Washington Post
New York Times
Cnn
Learn More

How It Works

  • Ask an Expert
  • Get a Professional Answer
  • Ask Followup Questions
  • 100% Satisfaction Guarantee
Learn More
close
Find Expert answers related to your question.
Sign up using email
We will never post anything without your permission.
Already have an account? Sign in

Ask a Programmer

Get a Professional Answer. 100% Satisfaction Guaranteed.
137 Programmers are Online Now
Type Your Programming Question Here...
characters left:
Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.
Truste
Contact Us | Terms of Service | Privacy & Security | About Us | Our Network
© 2003-2013 JustAnswer LLC
  • Pearl.com
  • JustAnswer UK
  • JustAnswer Germany
  • JustAnswer Spanish
  • JustAnswer Japan