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.
program an_danh;
uses crt;
var kq:real;
i:integer;
begin
clrscr;
kq:= 1;
for i:= 1 to 99 do kq:= kq + (i / (i * (i + 1)));
write('M= ',kq:0:10);
readln
end.
program an_danh;
uses crt;
var kq:real;
i:integer;
begin
clrscr;
kq:= 1;
for i:= 1 to 99 do kq:= kq + (i / (i * (i + 1)));
write('M= ',kq:0:10);
readln
end.
uses crt;
var x,y,z:real;
begin
clrscr;
write('Nhap x='); readln(x);
write('Nhap y='); readln(y);
z:=abs(1-sqr(x))+abs(1-sqr(y));
writeln('Z=',z:4:2);
readln;
end.
1:
uses crt;
var a,b,bt:real;
begin
clrscr;
write('a='); readln(a);
write('b='); readln(b);
bt:=(sqr(a)+sqr(b))/2;
writeln('bieu thuc=',bt:4:2);
readln;
end.
2:
uses crt;
var s,v,t:integer;
begin
clrscr;
write('nhap thoi gian xe chay:'); readln(t);
write('nhap van toc cua xe:'); readln(v);
s:=v*t;
writeln('quang duong xe chay duoc la: ',s:4:2);
readln;
end.
Program hotrotinhoc;
var d,n,i: byte;
a: array[1..100] of byte;
begin
write('N='); readln(n);
d:=0;
for i:=1 to n do
begin
write('a[',i,']='); readln(a[i]);
if a[i] mod 2=0 then inc(d);
end;
write('Mang vua nhap la :');
for i:=1 to n do write(a[i],' ');
writeln;
write('So phan tu chan la : ',d);
readln
end.
uses crt;
var a:array[1..255]of byte;
n,i,kt:integer;
st,st1:string;
begin
clrscr;
write('nhap chieu dai day so:'); readln(n);
for i:=1 to n do
begin
write('a[',i,']='); readln(a[i]);
end;
{-------------------------------xu-ly---------------------------------}
st:='';
kt:=0;
for i:=1 to n do
if a[i] mod 2=1 then
begin
str(a[i],st1);
kt:=1;
st:=st+st1;
end;
if kt>0 then
begin
write('doi xung cua cac so le la: ');
for i:=1 to length(st) do
write(st[i]:4);
for i:=length(st) downto 1 do
write(st[i]:4);
end;
readln;
end.
uses crt;
var st,st1,st2:string;
a:array[1..255]of integer;
n,d,i,dem,x,kt:integer;
begin
clrscr;
write('nhap so n:'); readln(n);
str(n,st);
d:=length(st);
for i:=1 to d do
val(st[i],a[i],x);
st2:='';
dem:=0;
kt:=0;
for i:=1 to d do
if a[i] mod 2<>0 then
begin
kt:=1;
dem:=dem+1;
str(a[i],st1);
st2:=st2+st1;
end;
if kt>0 then
begin
write('doi xung cua phan con lai sau khi xoa bot cac so chan la: ');
for i:=1 to dem do
write(st2[i]);
for i:=dem downto 1 do
write(st2[i]);
end;
readln;
end.
1: tính tổng của \(S=1+\frac{1}{2^2}+\frac{1}{3^2}+\frac{1}{4^2}+...+\frac{1}{100^2}\)
uses crt;
var s:real;
i:integer;
begin
clrscr;
s:=0;
for i:=1 to 100 do
s:=s+1/(sqr(i));
writeln('tong cua day so la: ',s);
readln;
end.
2: tính tổng \(S=1+\frac{1}{3^2}+\frac{1}{5^2}+\frac{1}{7^2}+...+\frac{1}{n^2}\)
uses crt;
var s:real;
n,i:integer;
begin
clrscr;
write('n='); readln(n);
s:=0;
for i:=1 to n do
if i mod 2=1 then s:=s+1/(sqr(i));
writeln('tong cua day so la: ',s:4:2);
readln;
end.