Recent Feedback
Purpose: To become familiar with the If-Then-Else structure and methods used to determine a stockbroker's commission.Problem:I have to write a top down program that will read a stock transaction and determine the stockbroker's commission. Each transaction includes the following data: the stock name, price per share, number of shares involved and the stockbroker's name. this is the output report how my work should appear Stockbrokers's CommissionStock Price Number Stockbroker CommissionName per share of Shares Name ----- -------- -------- ------ ----------Amoco 56.25 250 Guinn, M. 70.00PnWbrins 14.88 300 Myers, I. 51.00Ekodak 61.38 250 Banks, W. 70.00Chrysler 44.25 150 Lucas, T. 42.00McDnInvs 17.38 115 Lucas, B. 29.33McDonals 54.38 200 Dixon, D 56.00Total Commission Earned 318.33End of Report
Already Tried: I put information in but not coming out correctly
Hi
Welcome to JustAnswer
Could you elaborate a little more?
Which programming language are you using?
qbasic
Opting out for other experts to answer as I am not aware of qbasic. Not sure why you rated it as poor service as I never provided the answer nor you gave me the chance to reply
Experience: Expert in C, C++, Java, DOT NET, Python, HTML, Javascript, Design.
Relist: Incomplete answer.
I can do it in qbasic, but it will be completed only in 8 hours. Please let me know is it okay?
I need the answer in qbasic but by 8 am
What is your local time right now?
7:20 pm
How the program should get the input data (ask user for input or read from file)?
it should read the stock transaction an then determine the rest price stock name etc. the stockbroker is computed if the price per share P is less than or equal to $40.00 the commission rate is $0.17 per share ; if if P is greater than $40.00 the commission is $40.28 per share . If the number shares sold is less that 125 the commission is 1.5 times the rate per share.
Each detail line of output to printer is to include the stock transaction data set and the commission paid the stockbroker . test the stock name for the EOF. Print the total commission earned
I see your initial initial requirements. I am asking for clarification."it should read the stock transaction" - do you have an example of input data (I mean stock transaction)?Is it should be read from keyboard or from file?
Input data
Stock Price Number of Stockbroker
name per share shares name
Amoco $56.25 250 Guinn, M.
PnWbrins 14.88 300 Myers, I.
EKodak 61.38 250 Banks, W.
Chryler 44.25 150 Lucas, T.
McDnInvst 17.38 115 Lucas B.
McDonald's 54.38 200 Dixon, D.
i need help when will it be
Must be in qbasic
Purpose: To become familiar with the If-Then-Else structure and methods used to determine a stockbroker's commission. Problem:I have to write a top down program that will read a stock transaction and determine the stockbroker's commission. Each transaction includes the following data: the stock name, price per share, number of shares involved and the stockbroker's name. this is the output report how my work should appear Stockbrokers's Commission Stock Price Number Stockbroker Commission Name per share of Shares Name ----- -------- -------- ------ ---------- Amoco 56.25 250 Guinn, M. 70.00 PnWbrins 14.88 300 Myers, I. 51.00 Ekodak 61.38 250 Banks, W. 70.00 Chrysler 44.25 150 Lucas, T. 42.00 McDnInvs 17.38 115 Lucas, B. 29.33 McDonals 54.38 200 Dixon, D 56.00 Total Commission Earned 318.33 End of Report
I've uploaded the solution to http://danielkenneth.com/untitled.zip
it has error on too many lines output should be like this
Here is my code. Please download and test it.
do not see answer
I updated my comment, please check it once again.
alternative location: http://wikisend.com/download/678606/STOCK.zip
it runs but it is coming up $0.00 no words for stock name etc and and says line 7 file not found
You should unpack both files 'stock.bas' and 'stock.txt' and put into the same folder. Otherwise it will not work.Regards,Arty
ok how
Just don't run it from 'zipped' folder, but unpack it first (right click, then 'Extract All' if you are on Windows), then you may run 'stock.bas' or copy 'stock.bas' and 'stock.txt' to the directory where you run it.Regards,Arty
total commission is zero ??
No, I'm getting 318.33 will attach screenshots:
Experience: 15+ years of programming, C, C++, Java, PHP, awk, ruby, shell, ASM, Forth, Raptor, M.A.R.I.E, Excel
Please provide the following information:In what folder 'stock.txt' is located?In what folder 'stock.bas' is located?What is your working directory when you run 'qbasic'?Regards,Arty
I paid already I will fix the rest myself thank you
Thank you. I hope you can manage it. I leave the question open until you are sure you have no more questions.Regards,Arty
ok thanks
What errors were you receiving in my solution? It should've given the exact output you requested.