472,783 Members | 953 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,783 software developers and data experts.

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 1603

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: cm012b5105 | last post by:
Hello i want to put an interactive text programme in to a graphical box this is a small section of my text programme s = raw_input ("Hello whats your name? ") if s=='melvyn': print "your my...
0
by: melledge | last post by:
Full Programme for XTech 2005 Announced Premier European XML Industry Event Expands Focus to "XML, the Web and Beyond"; Co-hosted by the Mozilla Foundation,W3C, and OASIS, Presenters Include...
5
by: katekukku | last post by:
HI, I need the source code for a programme in C. It should have the basic features of a paint programme like circle, line etc, etc,. I lost a programme which wa driven by keyboard, if somebody...
76
by: KimmoA | last post by:
First of all: I love C and think that it's beautiful. However, there is at least one MAJOR flaw: the lack of a boolean type. OK. Some of you might refer to C99 and its _Bool (what's up with the...
18
by: arnuld | last post by:
i compiled the "hello world" programme from K&R2: #include<stdio.h> int main() { printf("hello world\n"); }
4
by: arnuld | last post by:
this is my final code. Can you folks advise some improvements for making this programme better? BTW, i aways compile my programme with this cmmand on Linux: g++ -ansi -pedantic -Wall -Wextra...
7
by: arnuld | last post by:
this is the programme which converts a string of digits into its numeric equivalent, given in section 2.7: /* atoi: convert s to integer */ int atoi(char s) { int i, n; n = 0; for (i = 0;...
12
by: arnuld | last post by:
this is exercise 2-3 from the mentioned section. i have created a solution for it but i see errors and i tried to correct them but still they are there and mostly are out of my head: ...
6
by: =?ISO-8859-1?Q?FERHAT_A=C7ICI?= | last post by:
hi everyone...I want to run any programme or file with my programme.example any file or programme, like this "xxx.ncn".I want If users double click this xxx.ncn this file can run by my...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.