Price fraction: Difference between revisions

Content added Content deleted
m (added whitespace before the TOC (table of contents), added a ;Task: (bold) header, added other whitespace to the task's preamble.)
Line 1: Line 1:
{{task|Financial operations}}
{{task|Financial operations}}
A friend of mine runs a pharmacy. He has a specialised function in his Dispensary application which receives a decimal value of currency and replaces it to a standard value. This value is regulated by a government department.


A friend of mine runs a pharmacy. He has a specialised function in his Dispensary application which receives a decimal value of currency and replaces it to a standard value.   This value is regulated by a government department.
Task: Given a floating point value between 0.00 and 1.00, rescale according to the following table:


;Task:
Given a floating point value between   0.00   and   1.00,   rescale according to the following table:


>= 0.00 < 0.06 := 0.10
>= 0.00 < 0.06 := 0.10
Line 24: Line 27:
>= 0.91 < 0.96 := 0.98
>= 0.91 < 0.96 := 0.98
>= 0.96 < 1.01 := 1.00
>= 0.96 < 1.01 := 1.00
<br><br>


=={{header|Ada}}==
=={{header|Ada}}==