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.
uses crt;
var i,s:integer;
begin
for i:=1 to 50 do writeln(*);
s:=0;
For i:=1 to 99 do while i mod 2 = 1 do s:=s+i;
writeln('tong cua phep tinh la',s); readln;
end.
uses crt;
var i,t:integer;
begin
clrscr;
for i:=1 to 50 do
write('*');
writeln;
t:=0;
for i:=1 to 100 do
if i mod 2=1 then t:=t+i;
writeln(t);
readln;
end.
Caua1:
program caumot;
begin
writeln('lop 8A chao ban!');
end.
Câu 2:
program cauhai;
int a,b,c :real;
begin
write('a='); readln(a);
write('b='); readln(b);
c= a+b;
write('Tong hai so a b la:',c);
end.
Bài 1:
uses crt;
var n,i,s:integer;
begin
clrscr;
write('Nhap n='); readln(n);
s:=0;
i:=1;
while i<=n do
begin
s:=s+i;
inc(i);
end;
writeln('Tong cac so trong khoang tu 1 den ',n,' la: ',s);
readln;
end.
Bài 2:
uses crt;
var n,i,s:integer;
begin
clrscr;
write('Nhap n='); readln(n);
s:=0;
i:=1;
while i<=n do
begin
s:=s+i;
i:=i+2;
end;
writeln('Tong cac so le trong khoang tu 1 den ',n,' la: ',s);
readln;
end.
uses crt;
var i:integer;
a:array[1..20]of string;
begin
clrscr;
for i:=1 to 20 do readln(a[i]);
for i:=1 to 20 do
writeln('Xin chao, ban thu ',i,' ten la: ',a[i]);
readln;
end.
Program Hoc24;
var i: byte;
begin
for i:=1 to 20 do
writeln('Chao ban thu ',i);
readln
end.
Câu 1:
uses crt;
var s,i:integer;
begin
clrscr;
s:=0;
for i:=1 to 10 do
s:=s+i;
writeln('Tong cua 10 so tu nhien dau tien la: ',s);
readln;
end.
Câu 2:
uses crt;
var a:array[1..100]of integer;
i,n,dem:integer;
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
dem:=0;
for i:=1 to n do
if a[i]>0 then inc(dem);
writeln('So luong phan tu duong la: ',dem);
readln;
end.
Câu 3:
uses crt;
var i,j:integer;
begin
clrscr;
for i:=1 to 9 do
begin
writeln('Bang nhan ',i,' la: ');
for j:=1 to 10 do
writeln(i,'*',j,'=',i*j);
delay(200);
end;
readln;
end.
1:
uses crt;
var t,x,i,n:integer;
begin
clrscr;
t:=0;
n:=10;
for i:=1 to n do
begin
readln(x);
t:=t+x;
end;
write(t);
readln;
end.
2:
uses crt;
var dem,x,i,n:integer;
begin
clrscr;
dem:=0;
n:=10;
for i:=1 to n do
begin
readln(x);
if x mod 2=0 then inc(dem);
end;
write(dem);
readln;
end.
3
program Cacsole;
uses crt;
var M, N, i: integer;
begin
clrscr;
write ('Nhap M= '); readln(M);
write ('Nhap N= '); readln(N);
for i := M to N do
if i mod 2 = 1 then
write (i,' ');
readln;
end.
Bài 1:
uses crt;
var i:byte;
begin
clrscr;
for i:=1 to 50 do
write('*');
readln;
end.
Bài 2:
uses crt;
var i,j:byte;
begin
clrscr;
for i:=1 to 10 do
begin
for j:=1 to 50 do
write('*');
writeln;
end;
readln;
end.
Giúp mình bài tập 3 luôn với