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.
![](https://rs.olm.vn/images/avt/0.png?1311)
uses crt;
var a:array[1..100]of real;
i,n:integer;
ln:real;
begin
clrscr;
readln(n);
for i:=1 to n do readln(a[i]);
ln:=0;
for i:=1 to n do if ln<a[i] then ln:=a[i];
writeln(ln:4:2);
readln;
end.
![](https://rs.olm.vn/images/avt/0.png?1311)
program DiemKiemTra;
var
i, max: integer;
diem: array[1..30] of integer;
begin
for i := 1 to 30 do
begin
writeln('Nhap diem cua hs thu ', i, ': ');
readln(diem[i]);
end;
max := diem[1];
for i := 2 to 30 do
begin
if diem[i] > max then
max := diem[i];
end;
writeln('Diem cao nhat la: ', max);
end.
![](https://rs.olm.vn/images/avt/0.png?1311)
refer
uses crt;
var i,n:longint;
a:array[1..100] of real;
s1,s,max,min:real;
begin
clrscr;
write('Nhap n: '); readln(n);
for i:=1 to n do
begin
write('Diem trung binh mon tin hoc cua ban thu ',i,' la: ');readln(a[i]);
end;
min:=a[1];max:=a[1];
for i:=2 to n do begin
if a[i]>max then max:=a[i];
if a[i]<min then min:=a[i]; end;
for i:=1 to n do
s:=s+a[i];
s1:=s/n;
writeln('So diem cao nhat la: ',max);
writeln('So diem thap nhat la: ',min);
write('Diem TB cua ca lop la: ',s1:0:1);
readln
![](https://rs.olm.vn/images/avt/0.png?1311)
uses crt;
var a:array[1..100]of real;
i,n:integer;
ln:real;
begin
clrscr;
readln(n);
for i:=1 to n do readln(a[i]);
for i:=1 to n do writeln(a[i]);
ln:=a[1];
for i:=1 to n do if ln<a[i] then ln:=a[i];
writeln(ln);
readln;
end.
![](https://rs.olm.vn/images/avt/0.png?1311)
program b1;
uses crt;
var i,n,dat,chuadat:integer;
a:array[1..100] of integer;
begin
clrscr;
write('Nhap tong so ban trong lop:');
readln(n);
for i:=1 to n do readln(a[i]);
dat:=0; chuadat:=0;
for i:=1 to n do
begin
if (a[i]>=5) then inc(dat);
if (5>=a[i]) then inc(chuadat);
end;
writeln('So hoc sinh dat la:',dat);
writeln('So hoc sinh chuadat la:',chuadat);
readln;
end.
Tham khao!
![](https://rs.olm.vn/images/avt/0.png?1311)
Nếu chưa học câu lệnh này thì rep lại cho mình để mình dùng mấy câu lệnh đã học từ b8 trở về trước nhá! Good luck for you :D
![](https://rs.olm.vn/images/avt/0.png?1311)
a:
#include <bits/stdc++.h>
using namespace std;
double a[1000];
int n,i;
int main()
{
cin>>n;
for (i=1; i<=n; i++) cin>>a[i];
for (i=1; i<=n; i++) cout<<a[i]<<" ";
return 0;
}
b:
#include <bits/stdc++.h>
using namespace std;
long long a[50],n,i,t;
int main()
{
cin>>n;
for (i=1; i<=n; i++) cin>>a[i];
t=0;
for (i=1; i<=n; i++) t+=a[i];
cout<<t;
return 0;
}
bạn có thể nào làm cho mình phần b làm theo kiểu lớp 8 đc không chứ nhìn như này mik ko hiểu
![](https://rs.olm.vn/images/avt/0.png?1311)
uses crt;
var a,b,c:real;
begin
clrscr;
write('Nhap diem Toan:'); readln(a);
write('Nhap diem Van:'); readln(b);
write('Nhap diem Anh:'); readln(c);
writeln('Diem trung binh la: ',(a+b+c)/3:4:2);
readln;
end.