Подсчитать количество целых чисел среди чисел a,b,c.
var
a, b, c : real;
count : byte;
begin
read (a, b, c);
count := 0;
if frac (a) = 0 then inc (count);
if frac (b) = 0 then inc (count);
if frac (c) = 0 then inc (count);
writeln (Count);
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
var
a, b, c : real;
count : byte;
begin
read (a, b, c);
count := 0;
if frac (a) = 0 then inc (count);
if frac (b) = 0 then inc (count);
if frac (c) = 0 then inc (count);
writeln (Count);
end.