Hãy nhập câu hỏi của bạn vào đây, nếu là tài khoản VIP, bạn sẽ được ưu tiên trả lời.

var i,n: integer;
s:real;
begin
write(‘Nhập n: ‘); readln(n);
i:=1;
repeat
s:=s+1/i;
i:=i+1;
until i=n;
write(‘s =‘, s:0:4);
readln
end.

Program Hotboy ;
Uses crt;
Var n,i,s : real;
Begin
Writeln(‘nhap n’); readln(n);
Repeat
S:=S+ 1/i;
I:=i+1 ;
Until n=i;
Writeln(‘S=’,S);
Readln
End.

#include <bits/stdc++.h>
using namespace std;
long long s,i,n;
int main()
{
cin>>n;
s=0;
for (i=1; i<=n; i++)
if (i%2==1) s=s+i*i;
cout<<s;
return 0;
}

program SumOfNumbers;
uses crt;
var
n, i, sum: integer;
numbers: array[1..100] of integer;
begin
clrscr;
write('Enter n: ');
readln(n);
// Tạo mảng các số tự nhiên từ 1 đến n
for i := 1 to n do
numbers[i] := i;
// Tính tổng các số tự nhiên từ 1 đến n
sum := 0;
for i := 1 to n do
sum := sum + numbers[i];
writeln('The sum of the first ', n, ' natural numbers is: ', sum);
readln;
end.

Uses Crt;
Var i,S,n:integer;
Begin
Clrscr;
Readln(i,S,n);
For i:=1 to n do S:=S+i*i;
Write(S);
Readln
End.
uses crt;
var s,i,n:longint;
begin
clrscr;
readln(n);
s:=0;
i:=1;
while i<=n do
begin
s:=s+i*i;
i:=i+1;
end;
writeln(s);
readln;
end.

1:
uses crt;
var n,i,t:integer;
begin
clrscr;
readln(n);
t:=0;
for i:=1 to n do
t:=t+i*i;
write(t);
readln;
end.
2
program bt2;
var i,n,t:integer;
begin
readln(n);
s:=0;
for i:=1 to n do
if i mod 2 = 1 then s:=s+i;
readln;
end.

c:
#include <bits/stdc++.h>
using namespace std;
long long ln,i,n,x;
int main()
{
cin>>n;
ln=LLONG_MIN;
for (i=1; i<=n; i++)
{
cin>>x;
ln=max(ln,x);
}
cout<<ln;
return 0;
}

Để đánh số trang một quyển sách dày 295 trang cần dùng bao nhiêu chữ số?
a:
#include <bits/stdc++.h>
using namespace std;
long long i,n,s;
int main()
{
cin>>n;
s=0;
for (i=1; i<=n; i++) s=s+i;
cout<<s;
return 0;
}
Uses crt;
Var i,n,s:longint;
Begin
Write('Nhap n: '); readln(n);
For i:= 1 to n do
if i mod 2<>0 then s:=s+i else s:=s-i;
write('Tong s la: ',s);
Readln
end.