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 a:array[1..20]of real;
t,tb,ln,nn:real;
i,n:integer;
begin
clrscr;
readln(n);
for i:=1 to n do readln(a[i]);
t:=0;
for i:=1 to n do t:=t+a[i];
writeln(t:4:2);
writeln(t/n:4:2);
nn:=a[1];
ln:=a[1];
for i:=1 to n do
begin
if nn>a[i] then nn:=a[i];
if ln<a[i] then ln:=a[i];
end;
writeln(nn);
writeln(ln);
readln;
end.
#include <bits/stdc++.h>
using namespace std;
double a,b,c,tb;
int main()
{
cin>>a>>b>>c;
tb=((a+b)*2+c)/5;
if (tb>=9) cout<<"Gioi";
else if ((tb>=7) and (tb<9)) cout<<"Kha";
else if ((tb>=5) and (tb<7)) cout<<"Trung binh";
else cout<<"Yeu";
return 0;
}
#include <bits/stdc++.h>
using namespace std;
double a,b,c,tb;
int main()
{
cin>>a>>b>>c;
tb=((a+b)*2+c)/5;
if (tb>=9) cout<<"Gioi";
else if ((tb>=7) and (tb<9)) cout<<"Kha";
else if ((tb>=5) and (tb<7)) cout<<"Trung binh";
else cout<<"Yeu";
return 0;
}
Var a:array:[1..1000] of real;
i,n:integer;
max,min,s,tb:real;
Begin
Write('Nhap so luong hoc sinh: ');readln(n);
For i:=1 to n do
Begin
Write('Nhap chieu cao hs thu ',i,' = ');readln(a[i]);
s:=s+a[i];
End;
tb:=s/n;
max:=a[1];min:=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;
writeln('Chieu cao lon nhat la ',max:10:1);
Writeln('Chieu cao nho nhat la ',min:10:1);
Write('Chieu cao trung binh la ',tb:10:1);
Readln
End.
uses crt;
var st:array[1..10]of string;
a:array[1..10]of integer;
i,n:integer;
begin
clrscr;
readln(n);
for i:=1 to n do
readln(st[i],a[i]);
for i:=1 to n do
writeln(st[i],' ',a[i]);
readln;
end.