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.
#include <bits/stdc++.h>
using namespace std;
long long i,n;
double p;
int main()
{
cin>>n;
p=0;
for (i=1; i<=n; i++)
p=p+1/(i*1.0);
cout<<p+3*n;
return 0;
}
2:
#include <bits/stdc++.h>
using namespace std;
int main()
{
cout<<fixed<<setprecision(2)<<sqrt(60)/sqrt(6);
return 0;
}
uses crt;
var i,n,s:integer;
begin
clrscr;
readln(n);
s:=0;
for i:=1 to n do
s:=s+i*i;
writeln(s);
readln;
end.
uses crt;
begin
clrscr;
writeln(10+4*sqr(15-10)/6+4);
readln;
end.
a)
program Tinh_S;
var
n, S: integer;
i: integer;
begin
write('Nhap gia tri cua n (30 <= n <= 90): ');
readln(n);
S := 0;
if (n >= 30) and (n <= 90) then
begin
for i := 1 to n do
S := S + i;
writeln('Gia tri cua bieu thuc S la: ', S);
end
else
writeln('Gia tri cua n khong hop le!');
readln;
end.
b)
program Tim_n;
var
n, S: integer;
begin
for n := 30 to 90 do
begin
S := 0;
for i := 1 to n do
S := S + i;
if S > 1000 then
begin
writeln('Gia tri cua n la: ', n);
break;
end;
end;
readln;
end.
a)program Tinh_S;
var n,s,i:longint;
begin
s := 0;
write('Nhap n (30 <= n <= 90): ');
readln(n);
for i := 1 to n do
begin
s := s + i;
end;
writeln('Tong S la: ', s);
end.
b) program Tim_N;
var n,s,i: longint;
begin
s := 0;
n := 1;
while s <= 1000 do
begin
s := s + n;
n := n + 1;
end;
writeln('Gia tri n can tim la: ', n-1);
end.
https://hoc247.net/hoi-dap/toan-6/tinh-1-1-2-1-3-1-4-1-100-faq172796.html
#include <bits/stdc++.h>
using namespace std;
long long i,s;
int main()
{
s=0;
for (i=1; i<=100; i++) s+=i;
cout<<s;
return 0;
}
#include <bits/stdc++.h>
using namespace std;
long long i,t;
int main()
{
t=0;
for (i=1; i<=20; i++) t=t+i;
cout<<2*t;
return 0;
}
Program HOC24;
var i,t: integer;
begin
t:=0;
for i:=1 to 20 do t:=t+i*2;
write('Ket qua la: ',t);
readln
end.