Viết chương trình nhập số N in ra: A) $\frac{1}{2000+N}$ +$\frac{1}{2001+N}$ +$\frac{1}{2021+N}$ B) N + N$^{2}$ + N$^{3}$ C) $\sqrt{N+N^{2}+N^{3}}$ D) $\frac{2}{N}$ +$\frac{3}{N+1}$ +$\frac{4}{N+2}$
2 câu trả lời
uses crt;
var N : real;
begin
clrscr;
write('Nhap so N = '); readln(N);
writeln('Bieu thuc A = ', 1 / (2000 + N) + 1 / (2001 + N) + 1 / (2021 + N) : 2 : 9);
writeln('Bieu thuc B = ', N + N * N + N * N * N : 2 : 2);
writeln('Bieu thuc C = ', Sqrt(N + N * N + N * N * N) : 2 : 2);
writeln('Bieu thuc D = ', 2 / N + 3 / (N + 1) + 4 / (N + 2) : 2 : 2);
readln
end.
Program baitap;
Uses crt;
Var N:integer;
Begin
Clrscr;
Write('N=');
Readln(N);
Writeln('1/(200+N)+1/(2001+N)+1/(2021+N)=',1/(200+N)+1/(2001+N)+1/(2021+N));
Writeln('N+sqr(N)+sqr(N)*N=',N+sqr(N)+sqr(N)*N);
Writeln('sqrt(N+sqr(N)+sqr(N)*N)=',sqrt(N+sqr(N)+sqr(N)*N));
Writeln('2/N+3/(N+1)+4/(N+2)=',2/N+3/(N+1)+4/(N+2));
Readln
End.