Answer the question
In order to leave comments, you need to log in
How to find all simple irreducible fractions less than 1 whose denominators do not exceed 9?
How to find all simple irreducible fractions less than 1 whose denominators do not exceed 9?
A fraction is given by two natural numbers - the numerator and the denominator.
It seems to have made a sketch, but such fractions as 2/4 2/6 3/6 4/6 2/8 4/8 6/8 slip
through. How to get rid of them?
var chisl,znam: integer;
begin
for znam:=2 to 9 do begin
for chisl:= 1 to znam do
if (chisl mod znam <>0) then write (chisl,'/',znam,' ');
writeln();
end
end.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question