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.
For...do:
var s,i: integer;
begin
readln(s,i);
s:=0;
For i:=3 to 99 do
If i mod 3 = 0 do s:=s+i;
write(s)
readln;
end.
while ... do:
Var i,S:integer;
Begin
Readln(i,s);
S:=0;
i:=3;
while i<=99 do
if i mod 3 = 0 then s:=s+i;
write(s);
Readln;
End.
a: uses crt;
var i,n:integer;
s:real;
begin
clrscr;
s:=0;
for i:=1 to 100 do s:=s+1/i;
writeln(s:4:2);
readln;
end.
b:
uses crt;
var i,n:integer;
s:real;
begin
clrscr;
s:=0;
i:=0;
while i<=100 do
begin
inc(i);
s:=s+1/i;
end;
writeln(s:4:2);
readln;
end.
Uses Crt;
Var A : Array [1..100] Of Integer ;
i , j , n , T : Integer ;
BEGIN
Clrscr ;
Write(' Do dai cua day so N = ') ; Readln (N) ;
Writeln (' Nhap day so : ') ;
For i := 1 To N Do
Begin
Write('A[', i ,'] = ') ; Readln ( A ) ;
End ;
i := 1 ;
While (i <= n-1) Do
Begin
j := i+1;
While j<=n do
Begin
If A[j] < A then
Begin
T := A[j];
A[j ] := A;
A := T ;
End ;
j := j + 1;
End ;
i := i + 1;
End ;
Writeln(' Day sau khi sap xep : ') ;
For i := 1 To N Do Write(A : 4) ;
Readln ;
END .
uses crt;
var i,t:integer;
begin
clrscr;
t:=0;
for i:=1 to 100 do t:=t+i;
writeln(t);
readln;
end.
uses crt;
var i,t:integer;
begin
clrscr;
t:=0;
for i:=1 to 100 do t:=t+i;
writeln(t);
readln;
end.
Program mun;
Uses crt;
Var i:integer;
Begin
For i:=1 to 10 do write ('2 × ', i,' = ', 2*i);
Readln;
End.
P/s: Ko chắc ạ!
uses crt;
var i:integer;
begin
clrscr;
for i:=1 to 10 do
writeln('2*',i,'=',2*i);
readln;
end.
var i,n:integer;
s:real;
begin
write('Nhap n = ');readln(n);
for i:=1 to n do
s:=s+1/(3*i+2);
write('Tong la ',s:10:2);
readln;
end.