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 TongSoChanTrongDay;
var
n, i, tong: integer;
a: array[1..100] of integer;
begin
tong := 0;
write('Nhap so phan tu cua day: ');
readln(n);
for i := 1 to n do
begin
write('Nhap phan tu thu ', i, ': ');
readln(a[i]);
if a[i] mod 2 = 0 then
tong := tong + a[i];
end;
writeln('Tong cac phan tu chan trong day la: ', tong);
readln;
end.
#include <bits/stdc++.h>
using namespace std;
int main()
{
cout<<"Chao cac ban"<<endl;
cout<<"Minh ten la:"<<endl;
cout<<"Minh hoc lop:";
return 0;
}
program XinChao;
uses crt;
begin
Clrscr;
writeln ('Chao cac ban!');
writeln('Minh ten la Nguyen Mai Phuong ');
writeln('Minh hoc lop 8A4');
readln;
end.
đáp án nha
Var a:array:[1..50] of real;
i,max:integer;
Begin
For i:=1 to 50 do
Begin
Write('Nhap so thu ',i,' = ');readln(a[i]);
End;
Write('Cac diem vua nhap la: ');
For i:=1 to 50 do
Write(a[i]:10:2);
Writeln;
max:=a[1];
For i:=2 to 50 do
if a[i]>max then max:=a[i];
Write('Diem trung binh lon nhat la ',max:10:2);
Readln
End.
Var a:array:[1..50] of real;
i:integer;
max:real;
Begin
For i:=1 to 50 do
Begin
Write('Nhap diem thu ',i,' = ');readln(a[i]);
End;
Write('Cac diem vua nhap la: ');
For i:=1 to 50 do
Write(a[i]:10:2);
writeln;
max:=a[1];
For i:=2 to 50 do
if a[i] > max then max:=a[i];
write('Diem lon nhat la ',max:10:2);
Readln
End.
#TK
program thongtincanhan
uses crt;
begin
clrscr;
writeIn (' Ho va ten cua ban ');
writeIn (' Lop cua ban ');
writeIn (' Dia chi cua ban ');
readIn
end.
uses crt;
var ten,lop,diachi:string;
begin
clrscr;
write('Nhap ten:'); readln(ten);
write('Nhap lop:'); readln(lop);
write('Nhap dia chi:'); readln(diachi);
writeln('Ten la: ',ten);
writeln('Lop la: ',lop);
writeln('Dia chi la: ',diachi);
readln;
end.
uses crt;
var NS:array[1..100] of integer; Dtoan,Dvan,Dtb:array[1..100] of real;
hoten:array[1..100] of string; i:byte;
begin
clrscr;
for i:=1 to 45 do
begin
write('Nhap ten cua hoc sinh thu',i,':'); readln(hoten[i]);
write('Nhap ngay sinh:'); readln(NS[i]);
write('Nhap diem toan:'); readln(Dtoan[i]);
write ('Nhap diem van:'); readln(Dvan[i]);
Dtb[i]:=(Dtoan[i]+Dvan[i])/2;
end;
writeln('Diem trung binh cua cac ban trong lop la:');
for i:=1 to 45 do
writeln(hoten[i],':',Dtb[i]:1:2);
readln;
end.
Tham khảo thui!
uses crt;
var st1,st2:string;
begin
clrscr;
readln(st1);
readln(st2);
writeln('Ten minh ',st1);
writeln('Lop ',st2);
readln;
end.
cảm ơn nhìu ạ