K
Khách

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:real;

begin

clrscr;

readln(a);

if (a>=9) then write('A')

else if ((7<=a) and (a<9)) then write('B')

else if ((5<=a) and (a<7)) then write('C')

else write('D');

readln;

end.

29 tháng 8 2023

python
 

diem_tb = float(input("Nhập điểm trung bình của học sinh: "))

if diem_tb >= 9:
    loai = 'A'
elif diem_tb >= 7:
    loai = 'B'
elif diem_tb >= 5:
    loai = 'C'
else:
    loai = 'D'

print("Loại học sinh: ", loai)


Pascal
 

program PhanLoaiHocSinh;
var
  diem_tb: real;
  loai: char;
begin
  write('Nhap diem trung binh cua hoc sinh: ');
  readln(diem_tb);

  if diem_tb >= 9 then
    loai := 'A'
  else if diem_tb >= 7 then
    loai := 'B'
  else if diem_tb >= 5 then
    loai := 'C'
  else
    loai := 'D';

  writeln('Loai hoc sinh: ', loai);
end.

uses crt;
var toan,ly,hoa,anh,van,sinh,su,dia,gdcd,gdqp,cn,td,dtb:real;
begin
clrscr;
repeat
write('nhap diem toan hoc:'); readln(toan);
if (toan<0) or (toan>10) then writeln('nhap lai');
until (0<=toan) and (toan<=10);
repeat
write('nhap diem vat ly:'); readln(ly);
if (ly<0) or (ly>10) then writeln('nhap lai');
until (0<=ly) and (ly<=10);
repeat
write('nhap diem hoa hoc:'); readln(hoa);
if (hoa<0) or (hoa>10) then writeln('nhap lai');
until (0<=hoa) and (hoa<=10);
repeat
write('nhap diem tieng anh:'); readln(anh);
if (anh<0) or (anh>10) then writeln('nhap lai');
until (0<=anh) and (anh<=10);
repeat
write('nhap diem ngu van:'); readln(van);
if (van<0) or (van>10) then writeln('nhap lai');
until (0<=van) and (van<=10);
repeat
write('nhap diem sinh hoc:'); readln(sinh);
if (sinh<0) or (sinh>10) then writeln('nhap lai');
until (0<=sinh) and (sinh<=10);
repeat
write('nhap diem lich su:'); readln(su);
if (su<0) or (su>10) then writeln('nhap lai');
until (0<=su) and (su<=10);
repeat
write('nhap diem dia li:'); readln(dia);
if (dia<0) or (dia>10) then writeln('nhap lai');
until (0<=dia) and (dia<=10);
repeat
write('nhap diem giao duc cong dan:'); readln(gdcd);
if (gdcd<0) or (gdcd>10) then writeln('nhap lai');
until (0<=gdcd) and (gdcd<=10);
repeat
write('nhap diem giao duc quoc phong:'); readln(gdqp);
if (gdqp<0) or (gdqp>10) then writeln('nhap lai');
until (0<=gdqp) and (gdqp<=10);
repeat
write('nhap diem cong nghe:'); readln(cn);
if (cn<0) or (cn>10) then writeln('nhap lai');
until (0<=cn) and (cn<=10);
repeat
write('nhap diem the duc:'); readln(td);
if (td<0) or (td>10) then writeln('nhap lai');
until (0<=td) and (td<=10);
dtb:=(toan+ly+hoa+anh+van+sinh+su+dia+gdcd+gdqp+cn+td)/13;
writeln('diem trung binh la: ',dtb:4:2);
if dtb>=8 then writeln('gioi')
else if (dtb<8) and (dtb>=6.5) then writeln('kha')
else if (dtb>6.5) and (dtb<=5) then writeln('trung binh')
else writeln('yeu');
readln;
end.

31 tháng 10 2021

#include <bits/stdc++.h>

using namespace std;

double x;

int main()

{

cin>>x;

if ((3.5<=x) and (x<=4.9)) cout<<"Yeu";

else if ((5.0<=x) and (x<=6.4)) cout<<"Trung binh";

else if ((6.5<=x) and (x<=7.9)) cout<<"Kha";

else cout<<"Gioi";

return 0;

}

7 tháng 1 2020
https://i.imgur.com/q6zE2fX.png

uses crt;
const n=10;
var diem:array[1..n]of real;
i,dem,dem1:integer;
t,tbc:real;
begin
clrscr;
for i:=1 to n do
begin
write('diem[',i,']='); readln(diem[i]);
end;
{-----------------------tinh-tong-diem-cua-10-hoc-sinh---------------------------------}
t:=0;
for i:=1 to n do
t:=t+diem[i];
writeln('tong diem cua 10 hoc sinh la: ',t:4:2);
{----------------------tinh-diem-tbinh-cua-10-hoc-sinh---------------------------------}
tbc:=t/n;
writeln('diem trung binh cua 10 hoc sinh la: ',tbc:4:2);
{---------------------dem-so-hoc-sinh-co-diem>5---------------------------------------}
dem:=0;
for i:=1 to n do
if diem[i]>5 then inc(dem);
writeln('so hoc sinh co diem lon hon 5 la: ',dem);
{---------------------dem-so-hoc-sinh-gioi--------------------------------------------}
dem1:=0;
for i:=1 to n do
if diem[i]>=8 then inc(dem1);
writeln('so hoc sinh gioi la: ',dem1);
readln;
end.

#include <bits/stdc++.h>

using namespace std;

double a,b,c,tbc;

int main()
{

cin>>a>>b>>c;

tbc=(a+b+c)/3;

cout<<"Tong la:"<<fixed<<setprecision(2)<<a+b+c<<endl;

cout<<"TBC la:"<<fixed<<setprecision(2)<<tbc;

return 0;

}

19 tháng 12 2021

 

 

#include <bits/stdc++.h>

using namespace std;

double a,b,c,tb;

int main()

{

cin>>a>>b>>c;

tb=(a+b+c)/3;

cout<<fixed<<setprecision(1)<<tb<<endl;

if (tb>=8) cout<<"Gioi";

else if ((6.5<=tb) and (tb<8)) cout<<"Kha";

else if ((5<=tb) and (tb<=6.5)) cout<<"Trung Binh";

else cout<<"Chua dat";

return 0;

}

1 tháng 1 2021

var t,dt,a,tb: real;

begin

write('Nhap diem mon Toan: '); readln(t);

write('nhap diem mon Tin: '); readln(dt);

write('Nhap diem mon Anh: '); readln(a);

if (a<=0) or (a>=10) or (t<=0) or (t>=10) or (dt<=0) or (dt>=10) then

repeat

writeln('Khong hop le, nhap lai: ');

write('Nhap diem mon Toan: '); readln(t);

write('nhap diem mon Tin: '); readln(dt);

write('Nhap diem mon Anh: '); readln(a);

until (a>=0) and (a<=10) and (t>=0) and (t<=10) and (dt>=0) and (dt<=10);

tb:=(t+dt+a)/3;

writeln('Diem trung binh: ',tb:2:1);

if (dt>=6.5) and (t>=6.5) and (a>=6.5) and (tb>=8) then writeln('Gioi') else

if (dt>=5) and (t>=5) and (a>=5) and (tb>=6.5) then writeln('Kha') else writeln('Trung binh');

end.

uses crt;

var toan,tin,anh,tb:real;

kt:integer;

begin

clrscr;

repeat

write('Nhap diem Toan:'); readln(toan);

write('Nhap diem Tin:'); readln(tin);

write('Nhap diem Anh:'); readln(anh);

until (0<=toan) and (toan<=10) and (0<=tin) and (tin<=10) and (0<=anh) and (anh<=10);

tb:=(toan+tin+anh)/3;

writeln('Diem trung binh cua 3 mon la: ',tb:4:2);

kt:=0;

if (tb>=8) and (toan>=6.5) and (tin>=6.5) and (anh>=6.5) then kt:=1;

if (6.5<=tb) and (tb<8) and (5<=toan) and (toan<6.5) and (5<=tin) and (tin<6.5) and (5<=anh) and (anh<6.5) then kt:=2;

if kt=0 then writeln('Hoc sinh trung binh');

if kt=1 then writeln('Hoc sinh gioi');

if kt=2 then writeln('Hoc sinh kha');

readln;

end.