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;
tich:real;
begin
write('nhap n='); readln(n);
tich:=1;
for i:=1 to n do tich:=tich*(1+1/(i*i));
write('ket qua la:',tich);
readln
end.
program dgv;
uses crt;
var x,y,z,n,i: integer;
p,S,A: real;
begin
clrscr;
writeln('Nhap x: '); read(x);
writeln('Nhap y: '); read(y);
writeln('Nhap z: '); read(z);
writeln('Nhap n: '); read(n);
if x mod 2 = 0 then write (x,' la so chan') else writeln(x,'la so le');
if y mod 2 = 0 then write (y,' la so chan') else writeln(y,'la so le');
if z mod 2 = 0 then write (z,' la so chan') else writeln(z,'la so le');
if n mod 2 = 0 then write (n,' la so chan') else writeln(n,'la so le');
if n mod 3 <> 1 then writeln('Tong khong co quy luat') else
begin
S:=0;
for i:= 0 to (n-1)/3 do
S:= S+(3i+1);
writeln('S = ',S);
A:=0;
p:=1;
for i:=1 to n do
begin
p:= p*(x/(x+y));
A:=A+p;
end;
writeln('A = ',A);
readln
end.
Câu 6:
uses crt;
var n,i:integer;
begin
clrscr;
readln(n);
for i:=1 to n do
if n mod i=0 then write(i:4);
readln;
end.
5:
uses crt;
var n,i,dem:integer;
begin
clrscr;
readln(n);
dem:=0;
for i:=0 to n do
if i mod 2=1 then
begin
write(i:4);
dem:=dem+1;
end;
writeln;
writeln(dem);
readln;
end.
uses crt;
begin clrscr;
writeln('(spr(5+2))/(3*3+1)=',(spr(5+2))/(3*3+1));
readln
end.
Câu 1:
uses crt;
var n,i:integer;
s:real;
begin
clrscr;
write('Nhap n='); readln(n);
s:=1;
for i:=1 to n do
s:=s*i;
writeln(s);
readln;
end.
Câu 2:
uses crt;
var t,i,n:integer;
begin
clrscr;
write('Nhap n='); readln(n);
t:=0;
for i:=1 to n do
t:=t+i;
writeln(t);
readln;
end.
uses crt;
var n,i:integer;
s:real;
begin
clrscr;
write('Nhap n='); readln(n);
s:=1;
for i:=1 to n do
s:=s+1/(i+(i+2));
writeln('Ket qua la: ',s:4:2);
readln;
end.
#include <bits/stdc++.h>
using namespace std;
long long a,b;
int main()
{
cin>>a>>b;
cout<<fixed<<setprecision(2)<<1/(a*1.0+b*1.0);
return 0;
}
cho cái cốt thôi
s:=0;
for i:= 1 to n do
s:=s*(1/(1/(i*i));
hiêu2 quá