This is really a general problem, although I will have to implement it in Pascal. We have to simulate a petrol pump, not too difficult, except for the LCD. If the price of the petrol is £1.24 it should display
CODE
__
| | | |
| __| |__|
| | |
| |__ |
Pardon the crappy ASCII art. The trouble is, what if it's £1.34? Then I have to replace the 2 with a 3 and this has to be done in the command prompt. The only thing I've thought of is having each line for each permutation but that's a stupid number of permutations. The course teacher is useless and doesn't know / won't help.
Any better ideas..?
-Craig1709
Edit: I now know the name of what I'm trying to emulate: a seven segment LCD display.
This post has been edited by craig1709: 23 Dec, 2007 - 06:52 AM