Viết chương trình nhập vào điểm trung bình của N số học sinh in ra màn hinh những điểm số đó
Giúp mình với ạ :))
Viết chương trình nhập vào điểm kiểm tra của một học sinh và in ra màn hình điểm trung bình của học sinh đó (3 môn thôi là đủ rồi)
nếu chạy ct mà nó không dừng lại thì bấm alt+F5 nhá
Giúp mình với ạ.Cảm ơn ạ. - Viết chương trình nhập họ và tên, điểm trung bình của từng môn. a) Tính điểm trung bình của tất cả các môn. b) Xếp loại học lực đưa ra màn hình điểm trung bình cao nhất. c) Đưa ra màn hình những môn có điểm trung bình lớn hơn hoặc bằng 5 đếm số điểm trung bình bằng 9. d) Sắp xếp theo thứ tự tăng dần của điểm trung bình.
Viết chương trình sử dụng biến mảng lưu điểm Tin học của học sinh trong lớp 8A, số lượng 35 học sinh thực hiện những yêu cầu sau:
a)Nhập vào điểm của 35 bạn học sinh
b)In ra màn hình tất cả điểm
c) In ra màn hình những học sinh có điểm dưới 5 hoặc điểm >9
Var a:array[1..35] of real;
i:integer;
Begin
For i:=1 to 35 do
Begin
Write('Nhap diem thu ',i);readln(a[i]);
End;
write('Diem vua nhap la ');
For i:=1 to 35 do write(a[i]:10:2);
Writeln;
write('Cac diem duoi 5 hoac > la ');
For i:=1 to 35 do
If (a[i]>9) or (a[i]<5) then write(a[i]:10:2)
Readln
End.
Viết chương trình nhập điểm các bạn trong lớp.Sau đó in ra màn hình học sinh giỏi,khá,trung bình
Giúp mình với ạ, cần gấp.
Tham khảo
program oken;
uses crt;
var a: array [1..100] of real;
i,n,dy,dtb,dk,dg:integer;
begin
clrscr;
write('Co bao nhieu ban can nhap diem: '); readln(N);
for i:=1 to n do
begin
write('nhap diem ban thu ',i,': ');
readln(a[i]);
if a[i]<5 then
dy:=dy+1
else if a[i]<6.4 then
dtb:=dtb+1
else if a[i]<7.9 then
dk:=dk+1
else
dg:=dg+1;
end;
writeln('So ban hoc yeu: ',dy);
writeln('So ban hoc trung binh: ',dtb);
writeln('So ban hoc kha: ',dk);
writeln('so ban hoc gioi: ',dg);
readln;
end.
program Phanloai;
uses crt;
Var i, n, Gioi, Kha, Trungbinh, Kem: integer;
A: array[1..100] of real;
Begin
clrscr;
write('Nhap so cac ban trong lop, n = '); readln(n);
writeln('Nhap diem:');
For i:=1 to n do Begin write(i,'.'); readln(a[i]); End;
Gioi:=0; Kha:=0; Trungbinh:=0; Kem:=0;
for i:=1 to n do
begin
if a[i]>=8.0 then Gioi:=Gioi+1;
if a[i]<5 then Kem:=Kem+1;
if (a[i]<8.0) and (a[i]>=6.5) then Kha:=Kha+1;
if (a[i]>=5) and (a[i]<6.5) then Trungbinh:=trungbinh+1
end;
writeln('Ket qua hoc tap:');
writeln(Gioi,' ban hoc gioi');
writeln(Kha,' ban hoc kha');
writeln(Trungbinh,' ban hoc trung binh');
writeln(Kem,' ban hoc kem');
readln
End.
Viết chương trình nhập từ bàn phím điểm toán lí hóa của 1 học sinh, tính điểm trung bình 3 môn đó. Dựa vào điểm trung bình xếp loại học lực và đưa ra màn hình. Đưa ra màn hình điểm thấp ,cao nhất, điểm trung bình
Cần gấp ạ giúp em với
E cảm ơn!
Viết chương trình nhập trung bình môn Tin học của các bạn học sinh trong lớp. In ra màn hình điểm của các bạn và điểm số lớn nhất (hoặc nhỏ nhất) của lớp.
refer
uses crt;
var i,n:longint;
a:array[1..100] of real;
s1,s,max,min:real;
begin
clrscr;
write('Nhap n: '); readln(n);
for i:=1 to n do
begin
write('Diem trung binh mon tin hoc cua ban thu ',i,' la: ');readln(a[i]);
end;
min:=a[1];max:=a[1];
for i:=2 to n do begin
if a[i]>max then max:=a[i];
if a[i]<min then min:=a[i]; end;
for i:=1 to n do
s:=s+a[i];
s1:=s/n;
writeln('So diem cao nhat la: ',max);
writeln('So diem thap nhat la: ',min);
write('Diem TB cua ca lop la: ',s1:0:1);
readln
Viết chương trình nhập vào một mảng điểm học sinh và in ra màn hình số điểm đó
program DemSoDiem;
var n, i: integer;
diem: array[1..100] of integer; // khai báo mảng điểm
begin
write('Nhap so luong hoc sinh: ');
readln(n);
// Nhập điểm cho từng học sinh
for i := 1 to n do begin
write('Nhap diem cua hoc sinh thu ', i, ': ');
readln(diem[i]);
end;
// In ra số điểm dưới dạng Pascal
writeln('const so_diem: array[1..', n, '] of integer = (', diem[1]);
for i := 2 to n do begin
write(', ', diem[i]);
end;
writeln(');');
end.
Bài 3: Viết chương trình nhập vào họ tên, điểm văn, điểm tóan, điểm anh văn của 1 học sinh. Sau đó in ra màn hình: họ tên, điểm trung bình, xếp lọai của học sinh đó (trên 1 dòng). Cho biết:
- Điểm trung bình: (điểm văn + điểm tóan + điểm anh văn) / 3
- Xếp loại: Giỏi, nếu điểm trung bình >= 9.0
Khá, nếu 7.0 <= điểm trung bình < 9.0
Trung bình, nếu 5.0 <= điểm trung bình < 7.0
Yếu, nếu điểm trung bình < 5.0
#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;
}
Viết chương trình nhập từ bàn phím họ và tên, điểm trung bình của từng môn của một học sinh a) Tính điểm trung bình môn b) Đưa ra màn hình điểm của môn cao nhất c) Đưa ra màn hình những điểm trung bình lớn hơn hoặc bằng 5 d) Đưa ra màn hình những môn có điểm trung bình bằng 10 e) sắp xếp theo thứ tự tăng dần của điểm trung bình