Những câu hỏi liên quan
Nguyễn Đức Hoàn
Xem chi tiết
Nguyễn Văn Tùng
5 tháng 5 2023 lúc 20:45

Đây là code Pascal để nhập và in điểm kiểm tra học kì môn tin cho N của từng học sinh:

program DiemKT;

var
N, i: integer;
diem: array1..100 of integer;

begin
write('Nhap so hoc sinh: ');
readln(N);

for i := 1 to N do
begin
write('Nhap diem kiem tra hoc ki cua hoc sinh thu ', i, ': ');
readln(diemi);
end;

writeln('Diem kiem tra hoc ki cua ', N, ' hoc sinh la:');

for i := 1 to N do
writeln('Hoc sinh thu ', i, ': ', diemi);

end.

Bình luận (0)
Bàn Chàn Khuân
Xem chi tiết
Bùi Thị Phương Nga
Xem chi tiết
Ngân Kim
Xem chi tiết
Hoàng Hải Bình
Xem chi tiết
Nguyễn Lê Phước Thịnh
22 tháng 2 2022 lúc 11:31

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.

Bình luận (0)
Nguyễn Quỳnh Anh 8A
Xem chi tiết
Nguyễn Lê Phước Thịnh
2 tháng 4 2022 lúc 6:59

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.

Bình luận (1)
Duy Minh
Xem chi tiết
Nguyễn Lê Phước Thịnh
19 tháng 12 2021 lúc 23:42

 

#include <bits/stdc++.h>

using namespace std;

double a,b,c,tb;

int main()

{

cin>>a>>b>>c;

tb=(a+b+c)/3;

cout<<fixed<<setprecision(1)<<tb<<endl;

if (tb>=8) cout<<"Gioi";

else if ((6.5<=tb) and (tb<8)) cout<<"Kha";

else if ((5<=tb) and (tb<=6.5)) cout<<"Trung Binh";

else cout<<"Chua dat";

return 0;

}

Bình luận (1)
Lê Nguyễn Ánh Nguyệt
Xem chi tiết
MinhHieu20999
26 tháng 4 2023 lúc 21:08

 

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.

 

Bình luận (0)
MinhHieu20999
26 tháng 4 2023 lúc 21:09

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.

Bình luận (0)
Lê Nguyễn Ánh Nguyệt
Xem chi tiết
Ngô Bá Hùng
25 tháng 4 2023 lúc 23:32

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.

Bình luận (0)