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 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.
uses crt;
var a:array[1..100]of real;
i,n: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
writeln('Diem cua ban thu ',i,' la: ',a[i]:4:2);
readln;
end.
program sodiemcaonhat; var i,max,n:integer; a:array [1..10000] of integer; begin write('nhap so phan muon nhap='); read(n); for i:=1 to n do begin write('diem thu',i,'='); read(a[i]); end; max:=a[1]; for i:=1 to n do begin if max < a[i] then max:=a[i]; end; write('so diem cao nhat la=',max); readln end.
program sodiemcaonhat;
var i,max,n:integer;
a:array [1..10000] of integer;
begin
write('nhap so phan muon nhap='); read(n);
for i:=1 to n do begin
write('diem thu',i,'='); read(a[i]);
end;
max:=a[1];
for i:=1 to n do begin
if max < a[i] then max:=a[i];
end;
write('so diem cao nhat la=',max);
readln
end.
Uses crt;
Var i,n:integer;
a:array[1..1000] of integer;
Begin
clrscr;
Write('Nhap so hoc sinh: ');readln(n);
Writeln('Nhap diem hoc ki mon tin cua ',n,' em hoc sinh:');
For i:=1 to n do
Begin
Write('Hoc sinh thu ',i,' : ');
readln(a[i]);
End;
Writeln('Diem kiem tra cua ',n,' em hoc sinh vua nhap la:');
For i:= 1 to n do writeln('Hoc sinh thu ',i,' : ',a[i]);
readln;
End.
#include <bits/stdc++.h>
using namespace std;
double a[100],t;
int n,i;
int main()
{
cin>>n;
for (i=1; i<=n; i++) cin>>a[i];
for (i=1; i<=n; i++)
cout<<"Diem cua ban thu "<<i<<" la: "<<fixed<<setprecision(2)<<a[i]<<endl;
t=0;
for (i=1; i<=n; i++) t+=a[i];
cout<<"Trung binh cua lop la: "<<fixed<<setprecision(2)<<t/(n*1.0);
return 0;
}
#include <bits/stdc++.h>
using namespace std;
double a,b,c,tbc;
int main()
{
cin>>a>>b>>c;
tbc=(a*3+b*2+c*3)/8;
cout<<fixed<<setprecision(2)<<tbc;
return 0;
}
uses crt;
var a,b,c,d,e: array[1..100] of real;
hsg,hsk,hstb,hsy,i:integer;
begin
clrscr;
hsg:=0; hsk:=0; hstb:=0; hsy:=0;
write('nhap so hoc sinh trong lop');readln(n);
for i:=1 to n do begin writeln('diem mieng ban thu',i,'la:');readln(a[i]);end;
for i:=1 to n do begin writeln('diem 15p ban thu',i,'la:');readln(b[i]);end;
for i:=1 to n do begin writeln('diem giua ki ban thu',i,'la:');readln(c[i]);end;
for i:=1 to n do begin writeln('diem mieng ban thu',i,'la:');readln(d[i]);end;
{'nhap rieng khoi nham nhe'};
for i:=1 to n do begin e[i]:=(a[i]+b[i]+c[i]*2 + d[i]*4)/7;
if e[i]<5.0 then hsy:=hsy+1;
if (e[i]<6.5) and (e[i]>5.0) then hstb:=hstb+1;
if (e[i]>6.5) and (e[i]<8.0) then hsk:=shk+1;
if e[i]>8.0 then hsg:=hsg +1; end;
write('so ban dat hsg',hsg);
write('so ban dat hsk',hsk);
write('so ban dat hstb',hstb);
write('so ban dat hsy',hsy); readln
end.