tip calculator
Author |
Message |
ephraim613
|
Posted: Mon May 04, 2009 8:45 pm Post subject: tip calculator |
|
|
What is it you are trying to achieve?
a program that will calculate tips for people (I work in a cafe)
What is the problem you are having?
figuring out how to essentially merge a program that does calculate tips but one person at a time, and the run window is very cluttered, with a program I did years ago when I was learning Turing and understood it better (4 years ago!) that takes n number of students names, grades, averages, and genders and then out puts them into a nice neat grid.
Describe what you have tried to solve this problem
I've tried various copy and pastes of the tip program into the array program with very little success.
Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
I'll post the tip calculator code here as its short, but the array program will be attached as its 59 lines
Turing: |
%calculates the tips for the week for a person
put "Please enter the total amount of tips for the week"
var weektotal : real
get weektotal
loop
put "Enter the partner's name"
put "(or number if the name is not available) that is on the sheet,"
put "then enter the percent as shown on the print out."
put "Repeat for the next partner"
var partner : string
var percent : real
var tips : real
get partner, percent
tips := weektotal * percent
put "the tips ", partner, " has is $", tips
end loop
|
Please specify what version of Turing you are using
I'm using v4.1.1
Description: |
procedure needed for the array program to work properly |
|
Download |
Filename: |
EnterProcedure.t |
Filesize: |
850 Bytes |
Downloaded: |
91 Time(s) |
Description: |
the array program from 4 years ago |
|
Download |
Filename: |
sorting arrays.t |
Filesize: |
1.52 KB |
Downloaded: |
98 Time(s) |
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
tjmoore1993
|
Posted: Tue May 05, 2009 3:29 pm Post subject: RE:tip calculator |
|
|
Please setup a scenario because you are not making sense. When making a small program like this you should use several different variables. You can join them as an array...
Also it helps if you make the problem more specific
|
|
|
|
|
|
|
|