Varn: integer; begin readln(n); while n > 7 do n := n - 7; if(n = 1) then write('Понедельник'); if(n = 2) then write('Вторник'); if(n = 3) then write('Среда'); if(n = 4) then write('Четверг'); if(n = 5) then write('Пятница'); if(n = 6) then write('Суббота'); if(n = 7) then write('Воскресенье'); end.
Answers & Comments
Verified answer
Varn: integer;begin
readln(n);
while n > 7 do
n := n - 7;
if(n = 1) then write('Понедельник');
if(n = 2) then write('Вторник');
if(n = 3) then write('Среда');
if(n = 4) then write('Четверг');
if(n = 5) then write('Пятница');
if(n = 6) then write('Суббота');
if(n = 7) then write('Воскресенье');
end.