begin writeln('Enter a positive integer: '); readln(num);
if (num mod 3 = 0) and (num mod 5 = 0) then writeln(num, ' is divisible by both 3 and 5.') else if num mod 3 = 0 then writeln(num, ' is divisible by 3 but not by 5.') else if num mod 5 = 0 then writeln(num, ' is divisible by 5 but not by 3.') else writeln(num, ' is not divisible by either 3 or 5.');
program CheckDivisibility;
var
num: integer;
begin
writeln('Enter a positive integer: ');
readln(num);
if (num mod 3 = 0) and (num mod 5 = 0) then
writeln(num, ' is divisible by both 3 and 5.')
else if num mod 3 = 0 then
writeln(num, ' is divisible by 3 but not by 5.')
else if num mod 5 = 0 then
writeln(num, ' is divisible by 5 but not by 3.')
else
writeln(num, ' is not divisible by either 3 or 5.');
end.