How to resolve the algorithm Price fraction step by step in the Delphi programming language

Published on 12 May 2024 09:40 PM

How to resolve the algorithm Price fraction step by step in the Delphi programming language

Table of Contents

Problem Statement

A friend of mine runs a pharmacy.   He has a specialized 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.

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

Let's start with the solution: