Những câu hỏi liên quan
Bàn Chàn Khuân
Xem chi tiết
Bùi Thị Phương Nga
Xem chi tiết
Nguyên Đăng
Xem chi tiết
Hương Phạm
Xem chi tiết
Nguyễn Lê Phước Thịnh
19 tháng 12 2021 lúc 23:46

 

 

#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;

}

Bình luận (0)
Hồ Thị Thủy Tiên
Xem chi tiết
Luân Đào
1 tháng 1 2021 lúc 16:13

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.

Bình luận (0)
Nguyễn Lê Phước Thịnh
2 tháng 1 2021 lúc 9:18

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.

Bình luận (0)
Hương Đinh
Xem chi tiết
Vương Hương Giang
2 tháng 3 2022 lúc 19:19

XEM HÌNH

imagerotate

Bình luận (0)
Hương Đinh
Xem chi tiết
Đỗ Đức Duy
2 tháng 3 2022 lúc 19:05

image

Bình luận (0)
01.Xuân Anh Dư
Xem chi tiết
Nguyễn Lê Phước Thịnh
30 tháng 12 2021 lúc 15:01

#include <bits/stdc++.h>

using namespace std;

double a,b,c,d,t;

int main()

{

cin>>a>>b>>c>>d;

t=(a*3+b*2+c+d)/7;

cout<<fixed<<setprecision(2)<<t<<endl;

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

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

else if ((t>=5) and (t<6.5)) cout<<"Trung binh";

else cout<<"Yeu";

return 0;

}

Bình luận (0)
nguyễn quốc bảo
Xem chi tiết
Nguyễn Lê Phước Thịnh
30 tháng 4 2022 lúc 22:04

uses crt;

const fi='vanban.txt'

var f1:text;

a,b,c,tb:array[1..100]of real;

ln:real;

n,i:integer;

begin

clrscr;

assign(f1,fi); reset(f1);

n:=0;

while not eof(f1) do 

begin

n:=n+1;

readln(a[n],b[n],c[n]);

end;

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);

ln:=0;

for i:=1 to n do 

  if ln<tb[i] then ln:=tb[i];

writeln(ln:4:2);

close(f1);

readln;

end.

Bình luận (0)