468,249 Members | 1,431 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,249 developers. It's quick & easy.

who can type this programme

fff
Write a program that will process a financial transaction on an
unspecified number of accounts. The program will read the account
number, the balance, the transaction type and the amount from the user.
It will then apply the specified transaction to the balance of the
relevant account and write the account number and the updated balance
into the screen. The user input is made of the following information:

1)account number
2)current balance
3)transaction type
4)amount of transaction

sample input is:

acct num balance type amount
45 455 0 1.00
87 54 1 44.00
845 4548 2 455.00

type 0 means balance minus amount.
type 1 means balance + amount.
type 2 charge account by 2.

your programme should write warning message if new balance is negative
and if balance is >1000 add 1% to balance.

the output must contain acct num and new balance
here is sample output:
45 454
87 55
845 4550

best of luck

Mar 4 '06 #1
8 1422

fff wrote:
something that looked like "please do my homework for me"
http://www.parashift.com/c++-faq-lit...t.html#faq-5.2

Gavin Deane

Mar 4 '06 #2

fff wrote:
something that looked like "please do my homework for me"

http://www.parashift.com/c++-faq-lit...t.html#faq-5.2
http://www.parashift.com/c++-faq-lit...t.html#faq-5.8

Gavin Deane

Mar 4 '06 #3
TB
fff skrev:
Write a program that will process a financial transaction on an
unspecified number of accounts. The program will read the account
number, the balance, the transaction type and the amount from the user.
It will then apply the specified transaction to the balance of the
relevant account and write the account number and the updated balance
into the screen. The user input is made of the following information:


<snip>

Do you even want to learn c++?

--
TB @ SWEDEN
Mar 4 '06 #4
"fff" wrote:
Write a program that will process a financial transaction on an
unspecified number of accounts. The program will read the account
number, the balance, the transaction type and the amount from the user.
It will then apply the specified transaction to the balance of the
relevant account and write the account number and the updated balance
into the screen. The user input is made of the following information:

1)account number
2)current balance
3)transaction type
4)amount of transaction

sample input is:

acct num balance type amount
45 455 0 1.00
87 54 1 44.00
845 4548 2 455.00

type 0 means balance minus amount.
type 1 means balance + amount.
type 2 charge account by 2.
The sample seems to indicate that "charge" means the same thing as add.
Clarify this.
your programme should write warning message if new balance is negative
and if balance is >1000 add 1% to balance.

the output must contain acct num and new balance
here is sample output:
45 454
87 55
845 4550


The program seems to have the general form:

do
something
until done

The user can signal "doneness" by signaling end of file (control+ d or
control + z). depending on the OS

something can be expanded to:

read some numbers
compute some numbers
display some numbers

Can you add detail to any of those? Which part are you having a problem
with? You won't break anything, start writing some code. Don't be
reluctant to write testing code that won't be turned in. Read some numbers,
and print them to prove it worked. You can then either remove the test code
or convert such code into a comment, which has the same effect on the
compiler. Then do the next thing. It's best to ignore the outer "do....
until done" business and concentrate on doing exactly one thing for one
client. At the end you can integrate all this stuff, probably with a simple
menu. Don't make it pretty, make it work. Polite and pretty displays can
be added later. Note that "Please enter the balance" means the same thing
as "balance?" There is no real need for a prompt of any kind, *you* know
what is expected, you just wrote the bit of code being tested, didn't you?
Mar 4 '06 #5
On 4 Mar 2006 01:11:48 -0800 "fff" <fh*****@yahoo.com> waved a wand and
this message magically appeared:
Write a program that will process a financial transaction on an
unspecified number of accounts. The program will read the account
number, the balance, the transaction type and the amount from the user.
It will then apply the specified transaction to the balance of the
relevant account and write the account number and the updated balance
into the screen.


You are a fucking lazy student. Why are you even bothering taking the C+
+ course at all?

--
http://www.munted.org.uk

"Honestly, what can I possibly say to get you into my bed?" - Anon.
Mar 4 '06 #6
Alex Buell wrote:
On 4 Mar 2006 01:11:48 -0800 "fff" <fh*****@yahoo.com> waved a wand and
this message magically appeared: You are a fucking lazy student. Why are you even bothering taking the C+
+ course at all?


Here, I'd like to ask a question. Do you mean that he is a "fucking
lazy" student or just "fucking student that is lazy"? I sort of predict
that English solves this disambiguation but I wanted to know what you
originally were trying to say.
Thanks!

Mar 4 '06 #7
On Sat, 04 Mar 2006 08:24:00 -0800 Aleksander Beluga
<ch*****@tigris.org> waved a wand and this message magically appeared:
Alex Buell wrote:
On 4 Mar 2006 01:11:48 -0800 "fff" <fh*****@yahoo.com> waved a wand and
this message magically appeared:

You are a fucking lazy student. Why are you even bothering taking the C+
+ course at all?


Here, I'd like to ask a question. Do you mean that he is a "fucking
lazy" student or just "fucking student that is lazy"? I sort of predict
that English solves this disambiguation but I wanted to know what you
originally were trying to say.


If I wanted to be precise, I'd code that in ADA.

--
http://www.munted.org.uk

"Honestly, what can I possibly say to get you into my bed?" - Anon.
Mar 4 '06 #8
fff wrote:

[homework assignment]
Who can "type" this? Hopefully fff, or he/she/it is unlikely to pass
this course.

Brian

Mar 4 '06 #9

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by cm012b5105 | last post: by
5 posts views Thread by katekukku | last post: by
76 posts views Thread by KimmoA | last post: by
18 posts views Thread by arnuld | last post: by
4 posts views Thread by arnuld | last post: by
7 posts views Thread by arnuld | last post: by
12 posts views Thread by arnuld | last post: by
6 posts views Thread by =?ISO-8859-1?Q?FERHAT_A=C7ICI?= | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.