In Pascal, make a program: determine the divisibility by 3 for a four-digit number. (I think that it is necessary to use

In Pascal, make a program: determine the divisibility by 3 for a four-digit number. (I think that it is necessary to use the divisibility of a number: the number will be divisible by 3 if the sum of the digits of this number is divisible by three)

Everything is much simpler: in Pascal there is a mod operator, which allows you to determine the remainder of the division. A number is a multiple of three when it is divisible by three without a remainder (i.e., the remainder of a division by three is zero).

var a, b: integer;
begin
writeln (‘Enter a number’);
readln (a);
b: = a mod 3;
if b = 0 then writeln (‘The number is a multiple of three’) else writeln (‘The number is not a multiple of three’);
end.



One of the components of a person's success in our time is receiving modern high-quality education, mastering the knowledge, skills and abilities necessary for life in society. A person today needs to study almost all his life, mastering everything new and new, acquiring the necessary professional qualities.