2 câu trả lời
uses crt;
var n,i,s:longint;
begin
clrscr;
write('n=');readln(n);
for i:=1 to n do if i mod 2=0 then inc(s,i);
writeln(s);
readln
end.
#include <bits/stdc++.h>
using namespace std;
int main()
{
int s=0;
for (int i=1; i<=10; i++)
if (i%2==0) s+=i;
cout << s;
return 0;
}