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,b,c,tb:array[1..100]of real;

i,n:integer;

begin

clrscr;

n:=5;

for i:=1 to n do 

  begin

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

end;

for i:=1 to n do 

  tb[i]:=(a[i]+b[i]+c[i])/3;

for i:=1 to n do 

  writeln('Diem trung binh cua ban thu ',i,' la: ',tb[i]:4:2);

readln;

end.

uses crt;

var a:array[1..14]of real;

i,n:integer;

t:real;

begin

clrscr;

write('Nhap so mon hoc='); readln(n);

for i:=1 to n do 

begin

repeat

write('A[',i,']='); readln(a[i]);

until (0<=a[i]) and (a[i]<=10);

end;

for i:=1 to n do 

  write(a[i]:4:2,' ');

t:=0;

for i:=1 to n do 

  t:=t+a[i];

writeln('Diem trung binh mon la: ',t/n:4:2);

if t>=5 then writeln('Duoc len lop')

else writeln('Thi lai');

readln;

end.

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.

1:

function dt(r:real):real;

begin

dt:=sqr(r)*pi;

end;

2:

function dt(a,b:real):real;

begin

dt:=1/2*a*b;

end;

19 tháng 5 2021

<bits/stdc++.h>
using namespace std;
int DTT(int a, int b, int c)

   int m = sqrt(2*b*b+2*c*c-a*a)/2;
    return m;

int main()
int a, b, c, m;
    cout << "Nhap ba canh tam giac" << endl;
    cin >> a >> b >> c;
    m = DTT(a,b,c);
    cout << m;
    return 0;

end.
 

uses crt;

var a,b,c:real;

{-----------------chuong-trinh-con--------------------}

function ttuyen(x,y,z:real):integer;

begin

ttuyen:=(2*(sqr(ab)+sqr(ac))-sqr(bc));

end;

{---------------chuong-trinh-chinh-----------------------}

begin

clrscr;

repeat

write('a='); readln(a);

write('b='); readln(b);

write('c='); readln(c);

until (a>0) and (b>0) and (c>0) and (a+b>c) and (a+c>b) and (b+c>a);

writeln(sqrt(ttuyen(a,b,c))/4:4:2);

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;

}