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;
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
refer
uses crt;
var i,n:longint;
a:array[1..100] of real;
s1,s,max,min:real;
begin
clrscr;
write('Nhap n: '); readln(n);
for i:=1 to n do
begin
write('Diem trung binh mon tin hoc cua ban thu ',i,' la: ');readln(a[i]);
end;
min:=a[1];max:=a[1];
for i:=2 to n do begin
if a[i]>max then max:=a[i];
if a[i]<min then min:=a[i]; end;
for i:=1 to n do
s:=s+a[i];
s1:=s/n;
writeln('So diem cao nhat la: ',max);
writeln('So diem thap nhat la: ',min);
write('Diem TB cua ca lop la: ',s1:0:1);
readln
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.
var i,n,s:integer;
t,v,a,tb:real;
begin
write('Nhap so luong hoc sinh ');readln(n);
for i:=1 to n do
begin
write('Nhap diem toan ');readln(t);
write('Nhap diem van ');readln(v);
write('Nhap diem anh ');readln(a);
s:=t+v+a;
tb:=s/3;
write('DTB cua ban thu ',i,' = ',tb:10:2);
s:=0;
end;
readln
end.
uses crt;
var a:array[1..100]of real;
n,i,dem:integer;
begin
clrscr;
readln(n);
for i:=1 to n do readln(a[i]);
dem:=0;
for i:=1 to n do
if a[i]>=8 then dem:=dem+1;
for i:=1 to n do
if a[i]>=8 then write(a[i]:4:2,' ');
writeln;
writeln(dem);
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.