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.
var dtb: array[1..1000] of real;
i,n: integer;
Chương trình:
uses crt;
var dtb: array[1..1000] of real;
i,n: integer;
begin
clrscr;
Write ('so luong 45 hoc sinh: '); readln (n);
for i:=1 to n do;
begin;
write ('nhap diem trung binh hoc sinh thu ',i,': '); readln (a[i]);
end;
write ('day diem vua nhap: ');
for i:=1 to n do write (a[i]:2:2);
readln;
end.
#include <bits/stdc++.h>
using namespace std;
double a,b,tb;
int main()
{
cin>>a>>b;
tb=(a+b*2)/3;
cout<<fixed<<setprecision(2)<<tb<<endl;
if (tb>=8.0) cout<<"Gioi";
else if ((tb>=6.5) and (tb<8)) cout<<"Kha";
else if ((tb>=5.0) and (tb<6.5)) cout<<"Trung binh";
else cout<<"Yeu";
return 0;
}
#include <bits/stdc++.h>
using namespace std;
double a,b,kq;
int main()
{
cin>>a>>b;
kq=(a+b*2)/3;
cout<<fixed<<setprecision(2)<<kq;
return 0;
}
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.
#include <bits/stdc++.h>
using namespace std;
double a[10],b,c,tb;
int n,i,dem;
int main()
{
cout<<"Nhap so cot thuong xuyen:"; cin>>n;
tb=0;
for (i=1; i<=n; i++)
{
cin>>a[i];
tb=tb+a[i];
}
cin>>b>>c;
tb=tb+b+c;
cout<<fixed<<setprecision(2)<<tb/(n+2)<<endl;
if (tb>=8) cout<<"Gioi";
else if ((tb>=6.5) and (tb<8)) cout<<"Kha";
else if ((tb>=5) and (tb<6.5)) cout<<"Trung binh";
else cout<<"Yeu";
return 0;
}
#include <bits/stdc++.h>
using namespace std;
double a[10],b,c,tb;
int i,n;
int main()
{
cout<<"Nhap so cot thuong xuyen:"; cin>>n;
for (i=1; i<=n; i++) cin>>a[i];
cout<<"Nhap diem giua ki:"; cin>>b;
cout<<"Nhap diem cuoi ki:"; cin>>c;
tb=0;
for (i=1; i<=n; i++) tb=tb+a[i];
tb=tb+b+c;
tb=tb/((n+2)*1.0);
cout<<fixed<<setprecision(2)<<tb<<endl;
if (tb>=8) cout<<"Gioi";
else if ((tb>=6.5) and (tb<8)) cout<<"Kha";
else if ((tb>=5) and (tb<6.5)) 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.
#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;
}