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,b,c:real;
begin
clrscr;
write('Nhap diem Toan:'); readln(a);
write('Nhap diem Van:'); readln(b);
write('Nhap diem Anh:'); readln(c);
writeln('Diem trung binh la: ',(a+b+c)/3:4:2);
readln;
end.
uses crt;
var a,b,c,tb:array[1..10]of real;
ln,nn:real;
n:integer;
i:integer;
begin
clrscr;
readln(n);
for i:=1 to n do readln(a[i],b[i],c[i]);
for i:=1 to n do
tb[i]:=(a[i]+b[i]+c[i])/3;
for i:=1 to n do
writeln(tb[i]:4:2);
readln;
end.
program DiemTB;
var
diemToan, diemVan, diemTB: real;
begin
write('Nhap diem mon Toan: ');
readln(diemToan);
write('Nhap diem mon Van: ');
readln(diemVan);
diemTB := (diemToan + diemVan) / 2;
writeln('Diem trung binh: ', diemTB:0:2);
if diemTB >= 5 then
writeln('Chuc mung! Ban da dau ky thi.')
else
writeln('Rat tiec! Ban da truot ky thi.');
readln;
end.
Tham khảo
Var a,b:array[1..100] of integer;
c: array[1..100] of real;
i,n:integer;
Begin
write('Nhap so hoc sinh: ');readln(n);
writeln('Nhap diem Toan');
for i:=1 to n do begin write(i,'. ');readln(a[i]);end;
writeln('Nhap diem Van');
for i:=1 to n do begin write(i,'. ');readln(b[i]);end;
for i:=1 to n do c[i]:=(a[i]+b[i])/2;
writeln('Diem trung binh');
for i:=1 to n do writeln(i,'. ',c[i]);
readln
Program HOC24;
var Toan,Ly,Tin,TBMToan,TBMLy,TBMTin: real;
i,n: byte;
begin
write('Nhap so ban hoc sinh trong lop: '); readln(n);
for i:=1 to n do
begin
write('Nhap diem Toan; Ly; Tin cua ban thu ',i,': ');
readln(Toan[i],Ly[i],Tin[i]);
end;
TBMToan:=0; TBMLy:=0; TBMTin:=0;
For i:=1 to n do
begin
TBMToan:=TBMToan+Toan[i];
TBMLy:=TBMLy+Ly[i];
TBMTin:=TBMTin+Tin[i];
end;
writeln('Diem trung binh mon Toan la: ',TBMToan:5:1);
writeln('Diem trung binh mon Ly la: ',TBMLy:5:1);
writeln('Diem trung binh mon Tin la: ',TBMTin:5:1);
For i:=1 to n do
writeln('Diem trung binh 3 mon cua ban thu ',i,' la: ',TBMToan+TBMLy+TBMTin:5:1);
Readln
end.
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]);
for i:=1 to n do writeln(a[i]);
ln:=a[1];
for i:=1 to n do if ln<a[i] then ln:=a[i];
writeln(ln);
readln;
end.
#include <bits/stdc++.h>
using namespace std;
double a[100],b[100],c[100],tb[100];
int n,i;
int main()
{
cin>>n;
for (i=1; i<=n; i++) cin>>a[i]>>b[i]>>c[i];
for (i=1; i<=n; i++)
tb[i]=(a[i]+b[i]+c[i])/3;
for (i=1; i<=n; i++)
cout<<"Diem cua ban thu "<<i<<" la: "<<fixed<<setprecision(2)<<tb[i]<<endl;
return 0;
}