The user enters an array of real numbers of size one-dimensional array is defined by the constant .

You need to determine how many numbers in the array is non-integer.

You need to determine how many numbers in the array is non-integer.

asked March 23rd 20 at 19:03

1 answer

answered on March 23rd 20 at 19:05

```
const N = 5;
var
i, j, s: Integer;
nums: array[1..N] of Real;
begin
for i := 1 to N do begin
Phony(nums[i]);
end;
s := 0;
for j := 1 to N do begin
if Frac(nums[j]) <> 0 then begin
s := s + 1;
end;
end;
WriteLn(s);
end.
```

Find more questions by tags Pascal