var i:integer;
begin
for i:=1 to 10 do
if i mod 3 <> 0 then
writeln(i)
else
writeln(-i);
end.
#python
for i in range(1,11):
if i % 3 == 0:
print(-i)
else:
print(i)
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
var i:integer;
begin
for i:=1 to 10 do
if i mod 3 <> 0 then
writeln(i)
else
writeln(-i);
end.
#python
for i in range(1,11):
if i % 3 == 0:
print(-i)
else:
print(i)