Help decompose the number (for example 8.3) into the following components: whole 5-matches: one, and the remainder 3.3. It is necessary to assign them to different variables. Another example: 16.7: it will be the third five and 1.7. You need to get two variables:

perem1:='3'; perem2:='1,7'; 

    1 answer 1

     Var Value, Perem2: Extended; Perem1: Integer; Begin Value:=16.7; Perem1:=Trunc(Value) Div 5; Perem2:=Value-Perem1*5; End;