Greetings,
I have my first assignment for my programming class to do, but first, I will say that I am aware of those people who post entire problems requesting members to do their homework for them. This is not really what my post is about.
I'm having a little problem with getting my head around the maths part. Let me explain...
Below is the assignment in full:
A small company is writing its cheques by hand and wants to change
over to computer generated cheques.Your boss has asked you, the new programmer, to produce a prototype
cheque writer that will accept the payees name and the amount payable
and display a cheque on the screen. The amount should be broken up
into ten thousand, thousand, hundreds and pounds. If the amount in any
of the categories is 0 then the word "zero" is put in that place.The name of the company is MODCON Ltd.
Input the payee name: Joe
Input the amount payable: EUR 12045.67
*******************************************************
MODCON
Promises to pay Joe EUR 12045.67
1 ten_thousand
2 thousand
zero hundred
45 euro
67 cent
*******************************************************Note that only one name is used. We cannot yet input first and
second names together.
Use only what you have learned to date Use any compiler you like to
test your code.Try to get the cheque in the middle of the screen using <iomanip>
Identify the Inputs Outputs and constants.Identify the data objects. Note that cheque in NOT an object as far as
we are concerned but is a collection of smaller objects that can be
seen on the screen in the example.List the actions to be performed on those objects.
Write the algorithm consisting of the list of actions ordered
correctly and any control structures used.
Translate the algorithm into C++ code.You need only test with positive numbers. Your code need not take
negative numbers into account.
I'm unsure how to have it display how many tens' of thousands, 'hundreads, cents etc. are in the number that was put in. Any ideas? Just some advice would be much appreciated, perhaps a link to an appropriate tutorial.
I have most of the code written. I will post it if you wish to see it....
Salutations....