tham khảo
uses crt;
var i,n:integer;
begin
clrscr;
write('n='); readln(n);
writeln('cac so chan trong khoang tu 1 toi ',n,' la:');
for i:=1 to n do
if i mod 2=0 then write(i:4);
readln;
end
tham khảo
uses crt;
var i,n:integer;
begin
clrscr;
write('n='); readln(n);
writeln('cac so chan trong khoang tu 1 toi ',n,' la:');
for i:=1 to n do
if i mod 2=0 then write(i:4);
readln;
end
#include <bits/stdc++.h>
using namespace std;
int main()
{
for (int i=1; i<=10; i++)
if (i%2==0) cout<<i<<" ";
return 0;
}