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,tb;
int main()
{
cin>>a>>b>>c;
tb=((a+b)*2+c)/5;
if (tb>=9) cout<<"Gioi";
else if ((tb>=7) and (tb<9)) cout<<"Kha";
else if ((tb>=5) and (tb<7)) cout<<"Trung binh";
else cout<<"Yeu";
return 0;
}
#include <bits/stdc++.h>
using namespace std;
double a,b,c,tb;
int main()
{
cin>>a>>b>>c;
tb=((a+b)*2+c)/5;
if (tb>=9) cout<<"Gioi";
else if ((tb>=7) and (tb<9)) cout<<"Kha";
else if ((tb>=5) and (tb<7)) cout<<"Trung binh";
else cout<<"Yeu";
return 0;
}
uses crt;
var a:array[1..100]of real;
i,n,dem1,dem2,dem3,dem4:integer;
begin
clrscr;
readln(n);
for i:=1 to n do readln(a[i]);
dem1:=0;
dem2:=0;
dem3:=0;
dem4:=0;
for i:=1 to n do
begin
if (a[i]>=8) then inc(dem1);
if (6.5<=a[i]) and (a[i]<=7.9) then inc(dem2);
if (5<=a[i]) and (a[i]<=6.4) then inc(dem3);
if (a[i]<5) then inc(dem4);
end;
writeln('So hoc sinh gioi la: ',dem1);
writeln('So hoc sinh kha la: ',dem2);
writeln('So hoc sinh trung binh la: ',dem3);
writeln('So hoc sinh kem la: ',dem4);
readln;
end.
a:array[1..200] of real;
begin
clrscr;
write('Nhap tong so ban trong lop:');
readln(n);
for i:=1 to n do readln(a[i]);
gioi:=0; kha:=0; kem:=0;
for i:=1 to n do
begin
if (a[i]>=8) then inc(gioi);
if (6.5<=a[i]) and (a[i]<=7.9) then inc(kha);
if (a[i]<6.5) then inc(kem);
end;
writeln('So hoc sinh gioi la:',gioi);
writeln('So hoc sinh kha la:',kha);
writeln('So hoc sinh kem la:',kem);
readln;
end.
câu 1:
uses crt;
var a,b,c,d,ln:integer;
begin
clrscr;
write('a='); readln(a);
write('b='); readln(b);
write('c='); readln(c);
write('d='); readln(d);
ln:=a;
if ln<b then ln:=b;
if ln<c then ln:=c;
if ln<d then ln:=d;
writeln('so lon nhat la: ',ln);
readln;
end.
câu 2:
uses crt;
var v,t,l:integer;
tb:real;
begin
clrscr;
write('nhap diem van:'); readln(v);
write('nhap diem toan:'); readln(t);
write('nhap diem ly:'); readln(l);
tb:=(v*2+t*2+l)/5;
if tb<5 then writeln('kem');
if (tb>=5) and (tb<7) then writeln('trung binh');
if (tb>=7) and (tb<8) then writeln('kha');
if tb>=8 then writeln('gioi');
readln;
end.