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.

Đâ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.

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.

Var a:array:[1..1000] of real;
i,m:integer;
Begin
Write('m = ');readln(m);
For i:=1 to m do
Begin
Write('Nhap so thu ',i,' = ');readln(a[i]);
End;
Write('Cac diem vua nhap la: ');
For i:=1 to m do
Write(a[i]:10:2);
Readln
End.

Câu 1:
uses crt;
var n,i,kt:integer;
begin
clrscr;
write('Nhap n='); readln(n);
if n<2 then writeln(n,' khong la so nguyen to')
else begin
kt:=0;
for i:=2 to n-1 do
if n mod i=0 then kt:=1;
if kt=0 then writeln(n,' la so nguyen to')
else writeln(n,' khong la so nguyen to');
end;
readln;
end.
Câu 2:
uses crt;
var a:array[1..100]of integer;
i,n,max,min:integer;
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
max:=a[1];
min:=a[1];
for i:=1 to n do
begin
if max<a[i] then max:=a[i];
if min>a[i] then min:=a[i];
end;
writeln('So lon nhat la: ',max);
writeln('So nho nhat la: ',min);
readln;
end.

Đây là chương trình mình viết bằng ngôn ngữ C++, mình sử dụng biến mảng a đánh số từ 0 tới 45. Khi in ra màn hình thì số điểm của mỗi học sinh sẽ viết trên mỗi dòng.
CODE:
#include <iostream>
using namespace std;
int a[45];
int main()
{
for(int i=0;i<45;i++){
cin>>a[i];
}
for(int i:a){cout<<i<<endl;}
return 0;

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 a:array[1..35]of real;
i,n:integer;
begin
clrscr;
n:=35;
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
for i:=1 to 35 do
writeln('Diem cua ban thu ',i,' la: ',a[i]:4:2);
readln;
end.