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 Chieu_cao;
uses crt;
var Long, Trang : integer;
begin
writeln('Nhap chieu cao cua Long (Duoi dang cm)');
readln(Long);
writeln('Nhap chieu cao cua Trang (Duoi dang cm)');
readln(Trang);
if Long > Trang then writeln('Long cao hon Trang')
else writeln('Trang cao hon Long);
end.
#AeMZn
program Chieu_cao;
uses crt;
var Long, Trang : integer;
begin
writeln('Nhap chieu cao cua Long (Duoi dang cm)');
readln(Long);
writeln('Nhap chieu cao cua Trang (Duoi dang cm)');
readln(Trang);
uses crt;
var cao:array[1..60]of real;
i,n:integer;
max,min:real;
begin
clrscr;
write('Nhap so hoc sinh:'); readln(n);
for i:=1 to n do
begin
write('Chieu cao cua ban thu ',i,'='); readln(cao[i]);
end;
max:=cao[1];
min:=cao[1];
for i:=1 to n do
begin
if max<cao[i] then max:=cao[i];
if min>cao[i] then min:=cao[i];
end;
writeln('Chieu cao thap nhat la: ',min:4:2);
writeln('Chieu cao cao nhat la: ',max:4:2);
readln;
end.
#include<iostream>
using namespace std;
int main() {
int a, b, c, d, e;
cin >> a >> b >> c >> d >> e;
int g = a + b + c + d + e;
cout << g / 5;
return 0;
}
tham khảo
uses crt;
var cao:array[1..60]of real;
i,n:integer;
max,min:real;
begin
clrscr;
write('Nhap so hoc sinh:'); readln(n);
for i:=1 to n do
begin
write('Chieu cao cua ban thu ',i,'='); readln(cao[i]);
end;
max:=cao[1];
min:=cao[1];
for i:=1 to n do
begin
if max<cao[i] then max:=cao[i];
if min>cao[i] then min:=cao[i];
end;
writeln('Chieu cao thap nhat la: ',min:4:2);
writeln('Chieu cao cao nhat la: ',max:4:2);
readln;
end.
Tham khảo
uses crt;
var cao:array[1..60]of real;
i,n:integer;
max,min:real;
begin
clrscr;
write('Nhap so hoc sinh:'); readln(n);
for i:=1 to n do
begin
write('Chieu cao cua ban thu ',i,'='); readln(cao[i]);
end;
max:=cao[1];
min:=cao[1];
for i:=1 to n do
begin
if max<cao[i] then max:=cao[i];
if min>cao[i] then min:=cao[i];
end;
writeln('Chieu cao thap nhat la: ',min:4:2);
writeln('Chieu cao cao nhat la: ',max:4:2);
readln;
end.
Var Long, Trang: real;
Begin
Write(‘nhap chieu cao Long =’); readln(Long);
Write(‘nhap chieu cao Trang =’); readln(Trang);
If Long>Trang then writeln(‘Long cao hon Trang’)
else If Long=Trang then write('Long cao bang Trang)
else write('Long thap hon Trang');
readln
end.
program SoSanhDiem;
var
DiemManh, DiemThanh: real;
begin
write('Nhap diem cua ban Manh: ');
readln(DiemManh);
write('Nhap diem cua ban Thanh: ');
readln(DiemThanh);
if DiemManh > DiemThanh then
writeln('Ban Manh dat diem cao hon ban Thanh.')
else if DiemManh < DiemThanh then
writeln('Ban Thanh dat diem cao hon ban Manh.')
else
writeln('Hai ban dat diem bang nhau.');
readln;
end.
#include <bits/stdc++.h>
using namespace std;
double a[1000],t;
int n,i;
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<<fixed<<setprecision(2)<<t/(n*1.0);
return 0;
}