Viết chương trình nhập điểm thi môn Tin học, môn Toán của các bạn trong lớp. Đếm và in ra màn hình số lượng các bạn có điểm thi trên trung bình
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 sử dụng biến mảng để nhập điểm trung bình môn tin học của các bạn trong lớp em.Thực hiện các yêu cầu sau - in điểm của các banh trong lớp em ra màn hình -tìm bạn có điểm trung bình cao nhất lớp em
uses crt;
var a:array[1..100]of real;
i,n:integer;
ln:real;
begin
clrscr;
readln(n);
for i:=1 to n do readln(a[i]);
for i:=1 to n do writeln(a[i]);
ln:=a[1];
for i:=1 to n do if ln<a[i] then ln:=a[i];
writeln(ln);
readln;
end.
Viết chương trình nhập điểm trung bình môn tin học cuối hk1 của các bạn hc sinh trong lớp em và in ra số điểm cao nhất?
GIÚP EM VỚI Ạ ! MAI EM THI RỒI
Nếu chưa học câu lệnh này thì rep lại cho mình để mình dùng mấy câu lệnh đã học từ b8 trở về trước nhá! Good luck for you :D
uses crt;
var a:array[1..50]of real;
max:real;
i,n:integer;
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('Nhap diem cua ban thu ',i,'='); readln(a[i]);
end;
max:=a[1];
for i:=1 to n do
if max<a[i] then max:=a[i];
writeln(max);
readln;
end.
viết chương trình nhập điểm môn tin của các bạn trong lớp mình au đó in ra màn hình sổ bạn số bạn đtaj kết quả học tập loại giỏi khá trung bình và yếu ( theo điều kiện>= 8 điểm giỏi từ 6,5 điểm đến 7,9 điểm khá từ 5 điểm đến 6,4 điểm trung bình dưới 5 điểm yếu)
viết chương trình nhập điểm 3 môn toán,ngữ văn, tiếng Anh của các bạn trong lớp , sau đó in ra màn hình điểm trung bình của phần toán , văn , tiếng Anh của cả lớp
uses crt;
var a,b,c:real;
begin
clrscr;
write('Nhap diem Toan:'); readln(a);
write('Nhap diem Van:'); readln(b);
write('Nhap diem Anh:'); readln(c);
writeln('Diem trung binh la: ',(a+b+c)/3:4:2);
readln;
end.
viết chương trình nhập điểm thi 2 môn ngữ văn và toán của các học sinh khối 9 tính điểm trung bình và in ra màn hình kết quả thi đậu nếu điểm trung bình lớn hơn hoặc bằng 5 còn thi trượt nếu như điểm trung bình bé hơn 5
program DiemTB;
var
diemToan, diemVan, diemTB: real;
begin
write('Nhap diem mon Toan: ');
readln(diemToan);
write('Nhap diem mon Van: ');
readln(diemVan);
diemTB := (diemToan + diemVan) / 2;
writeln('Diem trung binh: ', diemTB:0:2);
if diemTB >= 5 then
writeln('Chuc mung! Ban da dau ky thi.')
else
writeln('Rat tiec! Ban da truot ky thi.');
readln;
end.
Viết chương trình nhập vào điểm các môn toán , tin, anh. Tính và thông báo ra màn hình điểm trung bình 3 môn và dựa vào điểm trung bình hãy xếp loại cho học sinh đó ( Biết rằng học sinh giỏi nếu điểm tất cả các môn đều trên 6,5 và điểm trung bình trên 8, học sinh khá nếu điểm các môn trên 5 và điểm trung bình trên 6,5, còn lại là học sinh trung bình) (C++)
#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;
}
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.
Nhập vào điểm khảo sát chất lượng cuối năm 2022-2023 của các bạn học sinh lớp 9 , trường THCS Diễn Thành . biết rằng , mỗi bạn học sinh đều tham gia khảo sát bà môn Toán , Văn và Anh . In ra màn hình tổng điểm thi , điểm thi Trung bình của mỗi học sinh khối 9 của trường năm đó
var i,n,s:integer;
t,v,a,tb:real;
begin
write('Nhap so luong hoc sinh ');readln(n);
for i:=1 to n do
begin
write('Nhap diem toan ');readln(t);
write('Nhap diem van ');readln(v);
write('Nhap diem anh ');readln(a);
s:=t+v+a;
tb:=s/3;
write('DTB cua ban thu ',i,' = ',tb:10:2);
s:=0;
end;
readln
end.
viết chương trình
-Nhập mảng số thực điểm trung bình môn toán của N bạn trogn lớp
-In ra màng hình số bạn đạt loại giỏi ( nếu điểm trung bình không nhỏ hơn 8.0 ). và điểm các bạn này .
uses crt;
var a:array[1..100]of real;
n,i,dem:integer;
begin
clrscr;
readln(n);
for i:=1 to n do readln(a[i]);
dem:=0;
for i:=1 to n do
if a[i]>=8 then dem:=dem+1;
for i:=1 to n do
if a[i]>=8 then write(a[i]:4:2,' ');
writeln;
writeln(dem);
readln;
end.