🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: aus.computers.java
Article #1164

Re: Beginniner needs help, please

#1164
From: simon
Date: Fri, 25 Jun 1999 00:00
35 lines
1770 bytes
mrbafner wrote in message ...
>i have written this program, to try and work out the tax taken from their
>gross salaries.
>


You can't use ints to handle dollars and cents, you need to use floats
if you want decimal points or convert things to cents and insert
decimal place manually. (sorry to confuse)

>I run it and 2 extra lines appear (blank), if you put in a interger number,
>the net wage has these 2 numbers taken from it NOT THE TAX.
>

Hmm, sorry I haven't got much time and your program is full of
wierdness. Two things I can spot immediately:

> int = initialSalary * .30;    << shouldn't this be int tax= or something

> else; {                                << I don't think you want the
semicolon there

>how can I work it out so the tax is taken from the net amount. It has to be
>30% tax, with a 10,000 tax free threshhold based on the amount that has
been
>entered. PLEASE HELP I AT MY TETHER


I suggest you start with a simpler program that simply does the calculation
and you are not trying to do user input as well.

Hope this helps,

Simon
Technical Details
Message-ID: <ZMAc3.15606$PN5.40033@newsfeeds.bigpond.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <Ourc3.164$wE1.14566@nsw.nnrp.telstra.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10d6db,386b2c114babcc7c,start
X-Google-Attributes: gid10d6db,public
From: "simon" <simon@gatecrashers.com>
Subject: Re: Beginniner needs help, please
Date: 1999/06/25
Message-ID: <ZMAc3.15606$PN5.40033@newsfeeds.bigpond.com>
X-Deja-AN: 493596428
References: <Ourc3.164$wE1.14566@nsw.nnrp.telstra.net>
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
X-Trace: newsfeeds.bigpond.com 930273465 139.134.157.133 (Fri, 25 Jun 1999 11:17:45 EST)
Organization: Telstra BigPond Internet Services (http://www.bigpond.com)
NNTP-Posting-Date: Fri, 25 Jun 1999 11:17:45 EST
Newsgroups: aus.computers.java