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.
#include <bits/stdc++.h>
using namespace std;
double a,b,c;
int main()
{
cin>>a>>b>>c;
cout<<fixed<<setprecision(2)<<(a+b+c)/3;
return 0;
}
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.
program TinhTBCMon;
var
n, i: integer;
diemAnh, diemVL, tongDiemAnh, tongDiemVL: real;
begin
tongDiemAnh := 0;
tongDiemVL := 0;
write('Nhap so hoc sinh: ');
readln(n);
for i := 1 to n do
begin
write('Nhap diem Tieng Anh cua hoc sinh ', i, ': ');
readln(diemAnh);
tongDiemAnh := tongDiemAnh + diemAnh;
write('Nhap diem Vat ly cua hoc sinh ', i, ': ');
readln(diemVL);
tongDiemVL := tongDiemVL + diemVL;
end;
writeln('Diem trung binh mon Tieng Anh cua lop la: ', tongDiemAnh/n:0:2);
writeln('Diem trung binh mon Vat ly cua lop la: ', tongDiemVL/n:0:2);
readln;
end.
#include <bits/stdc++.h>
using namespace std;
double a,b;
int main()
{
cin>>a>>b;
double tb=(a+b)/2;
if (tb>=5) cout<<"ket qua dat";
else cout<<"ket qua khong dat";
return 0;
}
sao ko giống gì mình học vậy:) mình nhwos sương sương là program rồi đến uses crt j mà ta
Program HOC24;
var i,d: integer;
a: array[1..6] of real;
begin
for i:=1 to 6 do
begin
write('Nhap diem cua ban thu ',i,': '); readln(a[i]);
end;
write('Diem trung binh tren 6.5 la: ');
for i:=1 to 6 do if a[i]>6.5 then write(a[i]:1:1,' ');
writeln;
d:=0;
for i:=1 to 6 do if a[i]<5 then d:=d+1;
write('Co ',d,' ban it hon 5 diem');
readln
end.
uses crt;
var a:array[1..6]of integer;
i,dem:integer;
begin
clrscr;
for i:=1 to 6 do
begin
write('Nhap diem cua ban thu ',i,' la: '); readln(a[i]);
end;
for i:=1 to 6 do
if a[i]>6.5 then write(a[i]:4);
writeln;
dem:=0;
for i:=1 to 6 do
if a[i]<5 then inc(dem);
writeln(dem);
readln;
end.
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.