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 bai1;
uses crt;
var a,b,c,s: real;
begin
clrscr;
write('nhap so thu nhat ='); readln(a);
write('nhap so thu hai ='); readln(b);
write('nhap so thu ba ='); readln(c);
s:=a+b+c;
writeln('tong ba so a,b,c =',s:4:2);
readln;
end.
program bai1;
uses crt;
var n: integer;
begin
clrscr;
write('nhap so n ='); readln(n);
if n mod 2 = 0 then
writeln('la so chan ') else
writeln('la so le ');
readln;
end.
Program HOC24;
var a: array[1..32000] of integer;
i,n,d: integer;
begin
write('Nhap N: ');
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
write('Day vua nhap la: ');
for i:=1 to n do write(a[i],' '); writeln;
d:=0;
for i:=1 to n do if a[i]>0 then d:=d+1;
write('Co ',d,' so duong');
readln
end.
uses crt;
var n:longint;
begin
clrscr;
readln(n);
if n mod 2=0 then write('la so chan')
else write('la so le');
readln;
end.
program BaiTap;
var
A: array[1..150] of integer;
N, i, sum: integer;
begin
write('Nhap so phan tu cua day A (N <= 150): ');
readln(N);
for i := 1 to N do
begin
write('Nhap phan tu thu ', i, ': ');
readln(A[i]);
end;
writeln('Day so vua nhap la:');
for i := 1 to N do
write(A[i], ' ');
writeln;
sum := 0;
for i := 1 to N do
if A[i] mod 2 = 0 then
sum := sum + A[i];
writeln('Tong cac phan tu chan trong day la: ', sum);
readln;
end.
uses crt;
var n:integer;
begin
clrscr;
readln(n);
if n>0 then writeln(n,' la so duong')
else writeln('ko la so duong');
if (n mod 2=1) and (n mod 3=0) then writeln('n la so le chia het cho 3')
else writeln('n ko la so le chia het cho 3');
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.
3) var a,b:integer;
begin
write('a=');readln(a);
write('b=');readln(b);
if (a<b) then write(' Thu tu tang dan cua 2 so la: ',a,' va ',b)
else write(' Thu tu tang dan cua 2 so la: ',b,' va ',a);
readln;
end.
1)
var a,b:integer;
begin
write('a=');readln(a);
write('b=');readln(b);
writeln(' Tong cua ',a,' va ',b,' la ',a+b);
writeln(' Hieu cua ',a,' va ',b,' la ',a-b);
writeln(' Tich cua ',a,' va ',b,' la ',a*b);
if b<>0 then writeln(' Thuong cua ',a,' va ',b,' la ',a/b);
readln;
end.