Trying to make simple "salary calculator" (im completely new to turing)
Author |
Message |
boocloud214
|
Posted: Fri Feb 29, 2008 5:50 pm Post subject: Trying to make simple "salary calculator" (im completely new to turing) |
|
|
AS stated in my title, i need to make a simple program (wouldn't really call it a program but w/e) for my Gr.10 programming class, problem is i have no clue as to how to make it T-T (all my notes are in my locker at school and can't complete it w/o them) So i have resorted to this site which i hope helps =D
(this is basicly it)
Secretary gets paid 8.65 /H for 40 hours
deductions from the earnings are taxes (incometax=24% of gross pay,Canada pension=7% of gross pay, unemployment insurance=2% of gross pay)
can anyone help??
Much obliged |
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
richcash
|
Posted: Fri Feb 29, 2008 5:59 pm Post subject: Re: Trying to make simple "salary calculator" (im completely new to turing) |
|
|
Refer to the Turing Walkthrough. You will probably only need the first tutorial.
Turing also has a reference in its help file (press F10). If you still can't get it, post a more specific question. What part of the question can't you do? |
|
|
|
|
 |
boocloud214
|
Posted: Fri Feb 29, 2008 6:07 pm Post subject: Re: Trying to make simple "salary calculator" (im completely new to turing) |
|
|
lol, everything
i remember i had to set like..constants and variables and like...multiply them and its all confusing >.< |
|
|
|
|
 |
apomb

|
Posted: Mon Mar 03, 2008 4:46 pm Post subject: RE:Trying to make simple "salary calculator" (im completely new to turing) |
|
|
could someone move this to the correct place ... i.e. turing help? wow |
|
|
|
|
 |
Tony

|
Posted: Mon Mar 03, 2008 4:54 pm Post subject: Re: Trying to make simple "salary calculator" (im completely new to turing) |
|
|
boocloud214 @ Fri Feb 29, 2008 6:07 pm wrote: and like...multiply them and its all confusing >.<
alright, well the first step is to figure out if you can do this on paper. Forget typing up any code. Simply put, can you work this out as a math problem? Type up your solution here. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
 |
Sean

|
Posted: Mon Mar 03, 2008 6:11 pm Post subject: Re: Trying to make simple "salary calculator" (im completely new to turing) |
|
|
That is how you have to declare your constants.
Turing: |
const tax := 0.27
|
Variable Declaration:
We just set a basic variable, named pay, which is a whole number integer. I suggest you use real numbers, allowing for pay to have decimal places. Standard equations consist of the variables, and constants you have set that either add, subtract, multiply, or divide each other until you get the desired answer. Like so:
Turing: |
var pay, total : real
const tax := 0.27
put "Enter your pay:"..
get pay
total := pay * tax
put "Total: ",total
|
This basic equation takes the inputed pay, and multiples it by the 27% tax rate. Then it will spit out your answer at the end. Pretty simple equations, hope this helps you remember your notes you have taken. Good luck. |
|
|
|
|
 |
|
|