Price fraction: Difference between revisions

Content added Content deleted
No edit summary
Line 240:
end
end</lang>
 
 
=={{header|PL/I}}==
<lang PL/I>
declare t(20) fixed decimal (3,2) static initial (
.06, .11, .16, .21, .26, .31, .36, .41, .46, .51,
.56, .61, .66, .71, .76, .81, .86, .91, .96, 1.01);
declare r(20) fixed decimal (3,2) static initial (
.10, .18, .26, .32, .38, .44, .50, .54, .58, .62,
.66, .70, .74, .78, .82, .86, .90, .94, .98, 1);
declare x float, d fixed decimal (3,2);
declare i fixed binary;
 
loop:
do i = 1 to 20;
if x < t(i) then
do; d = r(i); leave loop; end;
end;
</lang>
 
=={{header|PureBasic}}==