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 d:array[1..35]of real;
t,tkbq,max:real;
n,i,dem:integer;
begin
clrscr;
repeat
write('nhap n='); readln(n);
until (1<=n) and (n<=35);
for i:=1 to n do
begin
repeat
write('D[',i,']='); readln(d[i]);
until (0<=d[i]) and (d[i]<=10);
end;
t:=0;
for i:=1 to n do
t:=t+d[i];
tkbq:=t/n;
writeln('Diem tong ket binh quan la: ',tkbq:4:2);
max:=d[1];
for i:=1 to n do
if max<d[i] then max:=d[i];
writeln('Diem tong ket lon nhat la: ',max:4:2);
dem:=0;
for i:=1 to n do
if d[i]>tkbq then inc(dem);
writeln('Ti le hoc sinh co diem tong ket lon hon diem binh quan la: ',dem/n:4:2);
readln;
end.

uses crt;
var a,b,c,d,tb:real;
begin
clrscr;
write('Nhap diem cua ban:'); readln(a,b,c,d);
tb:=(a+b+c+d)/7;
if tb>=8 then writeln('Gioi');
if (6,5<=tb) and (tb<8) then writeln('Kha');
if (5<=tb) and (tb<6,5) then writeln('Trung Binh');
if tb<5 then writeln('Yeu');
readln;
end.

#include <bits/stdc++.h>
using namespace std;
int main()
{
int a[6] = {5, 4, 3, 2, 1, 0};
sort(a, a + 6);// thu được 0 1 2 3 4 5
//sort(a + 2, a + 5);thu được 5 4 1 2 3 0
vector a = {5, 4, 3, 2, 1, 0};
sort(a.begin(), a.end()); // thu được 0 1 2 3 4 5
return 0;
}

1:
uses crt;
const fi='ketqua.txt';
var f1:text;
st:string;
i,d:integer;
begin
clrscr;
assign(f1,fi); rewrite(f1);
write('Nhap xau:'); readln(st);
d:=length(st);
for i:=1 to d do
if st[i]=#32 then delete(st,i,1);
writeln(f1,st);
close(f1);
end.
2:
uses crt;
var a,b,c,d:integer;
{----------chuong-trinh-con-----------------------}
function min(x,y:integer):integer;
begin
if x<y then min:=x
else min:=y;
end;
{---------------chuong-trinh-chinh--------------------}
begin
clrscr;
write('a='); readln(a);
write('b='); readln(b);
write('c='); readln(c);
write('d='); readln(d);
writeln(min(a,min(b,min(c,d))));
readln;
end.

#include <bits/stdc++.h>
using namespace std;
long long x,n,i,t,dem;
int main()
{
cin>>n;
dem=0;
t=0;
for (i=1; i<=n; i++)
{
cin>>x;
if (x%2==0 && x>10) t+=x;
if (x%2!=0 || x<100) dem++;
}
cout<<t<<" "<<dem;
return 0;
}

uses crt;
var a:array[1..100]of integer;
i,n,tb:integer;
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
tb:=0;
i:=1;
while i<=n do
begin
tb:=tb+a[i];
inc(i);
end;
writeln(tb/n:4:2);
readln;
end.

program TinhTBCTimSoNT;
var
ten, lop: string;
n, i, tong, dem: integer;
A: array [1..11] of integer;
trung_binh: real;
function LaSoNguyenTo(x: integer): boolean;
var
i: integer;
begin
if x < 2 then
LaSoNguyenTo := false
else if x = 2 then
LaSoNguyenTo := true
else if x mod 2 = 0 then
LaSoNguyenTo := false
else
begin
i := 3;
while (i <= trunc(sqrt(x))) and (x mod i <> 0) do
i := i + 2;
LaSoNguyenTo := x mod i <> 0;
end;
end;
begin
// Nhập tên và lớp của học sinh
write('Nhập tên của học sinh: ');
readln(ten);
write('Nhập lớp: ');
readln(lop);
// Nhập dãy số nguyên và tính trung bình cộng
repeat
write('Nhập số phần tử của dãy số (n<12): ');
readln(n);
until n < 12;
tong := 0;
for i := 1 to n do
begin
write('Nhập phần tử thứ ', i, ': ');
readln(A[i]);
tong := tong + A[i];
end;
trung_binh := tong / n;
// In tên, lớp, dãy số và trung bình cộng ra màn hình
writeln('Học sinh: ', ten);
writeln('Lớp: ', lop);
write('Dãy số: ');
for i := 1 to n do
write(A[i], ' ');
writeln;
// In các số nguyên tố của dãy số ra màn hình
writeln('Các số nguyên tố của dãy số:');
for i := 1 to n do
if LaSoNguyenTo(A[i]) then
writeln(A[i]);
end.

uses crt;
var a:array[1..100]of integer;
i,n,t:integer;
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
for i:=1 to n do
write(a[i]:4);
writeln;
t:=0;
for i:=1 to n do
if a[i] mod 7=0 then t:=t+a[i];
writeln('Tong cac so chia het cho 7 la: ',t);
readln;
end.
Program hotrotinhoc_hoc24;
var d: array[1..35] of real;
i,n: integer;
t,min2,min,bq: real;
begin
write('Nhap so hoc sinh : '); readln(n);
t:=0; min:=32000;
for i:=1 to n
begin
write('d[',i,']='); readln(d[i]);
t:=t+a[i];
if a[i]<min then min:=a[i];
end;
bq:=t/n;
min2:=32000;
for i:=1 to n do
if (a[i]<min2) and (a[i]<bq) then
begin
inc(d);
min2:=a[i];
end;
writeln('Tong ket qua binh quan cua lop la : ',bq:1:1);
writeln('Diem tong ket nho nhat la : ',min:1:1);
writeln('Ti le hoc sinh co diem tong ket be hon diem binh quan la : ',min2:1:1);
readln
end.