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.

4 tháng 12 2016

program CT_dautien;

uses crt;

var

begin

clrscr;

writeln('moi nhap diem'); readln(x);

if x>= 8.0 then write(x, ' la loai gioi');

if x>=6.5 then write(x, ' la loai kha');

if x>=5.0 then write(x, ' la loai trung binh');

if x>=3.4 then write(x, ' la loai yeu');

if x<3.4 then write(x, ' la loai kem');

readln

end.

4 tháng 12 2016

y quen cho var ban ghi la: var x: integer

4 tháng 12 2016

var x:integer;

23 tháng 4 2017

câu d/ thì vượt quá trình độ cấp 2!

25 tháng 4 2018

BT1

const
nhap='BT1.inp';
xuat='BT1.out';
var
s,toan,tin,van:real;
t:integer;
begin
assign(input,nhap); reset(input);
assign(output,xuat); rewrite(output);
read(toan,tin,van);
s:=(toan+tin+van)/3;
write(s:0:1);
if s<5 then t:=1;
if (s>=5)and (s<6.5) then t:=2;
if (s>=6.5) and (s<8) then t:=3;
if (s>=8) then t:=4; writeln;
if t=1 then write('hsy');
if t=2 then write('hstb');
if t=3 then write('hstb');
if t=4 then write('hsg');
close(input); close(output);
end.

BT2

a)const
nhap='BT2a.inp';
xuat='BT2a.out';
var
s,n,i:longint;
a:array[1..100]of longint;
begin
assign(input,nhap); reset(input);
assign(output,xuat); rewrite(output);
readln(n);
s:=0;
for i:=1 to n do
begin
read(a[i]);
if a[i] mod 2=0 then s:=s+a[i];
end;
write(s);
close(input); close(output);
end.

b)const
nhap='BT2b.inp';
xuat='BT2b.out';
var
n,i,m,t:longint;
a,b,k:array[1..100]of longint;
begin
assign(input,nhap); reset(input);
assign(output,xuat); rewrite(output);
readln(n); t:=1; m:=1;
for i:=1 to n do
begin
read(a[i]);
if a[i] mod 2=0 then begin k[t]:=a[i]; t:=t+1; end;
if a[i] mod 2<>0 then begin b[m]:=a[i]; m:=m+1; end;
end;
for i:=1 to t-1 do
write(k[i],' '); writeln;
for i:=1 to m-1 do
write(b[i],' ');
close(input); close(output);
end.

c)const
nhap='BT2c.inp';
xuat='BT2c.out';
var
i,n,min,max:longint;
a:array[1..100]of longint;
begin
assign(input,nhap); reset(input);
assign(output,xuat); rewrite(output);
readln(n);
for i:=1 to n do
read(a[i]);
min:=a[1]; max:=a[1];
for i:=1 to n do
begin
if a[i]<min then min:=a[i];
if a[i]>max then max:=a[i];
end;
writeln(min); writeln(max);
close(input); close(output);
end.

Câu d và câu e mk sẽ gửi sau nha !

23 tháng 12 2021

Help

23 tháng 12 2021

Mình viết ở ngôn ngữ c++ nhé:

#include<iostream> 

using namespace std; 

int main() { 

double a; 

  cout << "Diem trung binh : "; cin >> a;

if (a >= 1 && a <= 10) { 

  if (a >= 8) { 

    cout << "Gioi"; 

} else if (a >= 6.5 && a <= 7.9) { 

    cout << "kha"; 

} else if (a <= 6.4 && a >= 5) { 

    cout << "trung binh"; 

} else { 

    cout << "yeu"; 

     }

} else {

    cout << "Diem so khong hop le";

     } 

return 0; 

}

 

27 tháng 12 2019

uses crt;
var t,v,dtb:real;
begin
clrscr;
write('nhap diem toan:'); readln(t);
write('nhap diem van:'); readln(v);
dtb:=(t+v)/2;
writeln('diem trung binh la: ',dtb:4:2);
if dtb<5 then writeln('xep loai yeu')
else if (dtb>=5) and (dtb<6.5) then writeln('xep loai trung binh')
else if (dtb>=6.5) and (dtb<8) then writeln('xep loai kha')
else writeln('xep loai gioi');
readln;
end.

28 tháng 12 2019

Program bt;

Var t,v,dtb:real;

Begin

Writeln('nhap t:=');

Readln(t);

Writeln('nhap v:=');

Readln(v);

dtb:=(t+v)/2;

Writeln('diem trung binh là:=',dtb);

if dtb<5.0 then writeln('xep loai yeu');

if 5.0<=dtb<=6.5 then writeln('xep loai trung binh');

if 6.5<=dtb<=8.0 then writeln('xep loai kha');

if dtb>=8.0 then writeln('xep loai gioi');

Readln;

End.

18 tháng 12 2019

Hỏi đáp Tin học

4 tháng 1 2021

uses crt;

var diem:real;

begin

clrscr;

repeat

write('Nhap diem trung binh:'); readln(diem);

until (0<=diem) and (diem<=10);

if diem<5 then writeln('Xep loai yeu')

else if (5<=diem) and (diem<6.5) then writeln('Xep loai trung binh')

else if (6.5<=diem) and (diem<8.0) then writeln('Xep loai kha')

else writeln('Xep loai gioi');

readln;

end.

4 tháng 12 2016

program CT_dautien;

uses crt;

var a:integer;

begin

clrscr;

writeln('moi nhap so a');readln(a);

if a mod 2 = 0 then write(a, 'la so chan') else write(a, 'la so le');

readln

end.

26 tháng 11 2016

sử dụng cấu trúc IF <điều kiện> THEN <câu lệnh>

 

8 tháng 4 2017

Uses CRT;

Var TB : real;

BEGIN

clrscr;

repeat

begin

write('Moi ban nhap diem trung binh: ');

Readln(TB);

end;

until (TB>0) and (TB<10);

If (TB >= 8) then write('hoc luc gioi') else

If (TB>=6.5) then write('hoc luc kha') else

If (TB>5) then write('hoc luc trung binh') else

If (TB>3.5) then write('hoc luc yeu') else

write('hoc luc kem');

Readln;

END.

2 tháng 12 2016

Uses CRT;

Var TB : real;

Begin

clrscr;

Readln(TB);

If TB >= 8 then write('hoc luc gioi') else

If 6.5<=TB<8 then write('hoc luc kha') else

If 5<=TB<6.5 then write('hoc luc trung binh') else

If 3.5<=TB<5 then write('hoc luc yeu') else

write('hoc luc kem');

Readln;

End.