viet chuong trinh nhap vao tu ban phim diem toan cua 1 mang gom 30Hs.Xet va in ra man hinh nhung HS co diem toan lon hon 6,5
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.
![](https://rs.olm.vn/images/avt/0.png?1311)
![](https://rs.olm.vn/images/avt/0.png?1311)
uses crt;
var diem:real;
begin
clrscr;
write('nhap diem:'); readln(diem);
if diem<5 then writeln('ban can co gang hon');
if (diem>=5) and (diem<6.5) then writeln('ban dat diem trung binh');
if (diem>=6.5) and (diem<8) then writeln('ban dat diem kha');
if diem>=8 then writeln('ban dat diem gioi');
readln;
end.
![](https://rs.olm.vn/images/avt/0.png?1311)
Lời giải :
program hotrotinhoc ;
var a: array[1..32000] of integer ;
i,n,max : integer ;
begin
write('Nhap n='); readln(n);
writeln('Nhap gia tri cua cac phan tu');
for i:= 1 to n do
begin
write('a[',i,']='); readln(a[i]);
end;
max:=a[1];
for i:= 1 to n do if max<a[i] then max:=a[i];
write('So lon nhat la:',max');
readln
end.
![](https://rs.olm.vn/images/avt/0.png?1311)
#include <iostream>
#include <iomanip>
#include <cmath>
#include <cstdio>
using namespace std;
#include <bits/stdc++.h>
int main() {
int n;
cin >> n;
int total = 0;
for (int i = 1; i <= n; i++) {
if (i % 20 == 0 && i % 10 != 0) {
if (i <= (n / 10)) {
total += i * i;
}
} else {
total += i;
}
}
cout << "The total is: " << total << endl;
for (int i = 0; i < n; i++) {
int du = i % 10;
int tongcacso = i % 10 * i % 10 * i % 10;
cout << "du = " << du << endl;
total += du * du * du;
cout << "\nsum = " << total << endl;
cout << "sum = (sum+i*i*i) " << endl;
}
return 0;
}
![](https://rs.olm.vn/images/avt/0.png?1311)
uses crt;
var a:array[1..100]of integer;
i,n,t:integer;
begin
clrscr;
write('n='); readln(n);
if (n>0) and (n<=100) then
begin
t:=0;
for i:=1 to n do
begin
write('a[',i,']='); readln(a[i]);
if (a[i] mod 2=0) or (a[i] mod 2=1) then t:=t+a[i];
end;
writeln('tong cac phan tu chan hoac le trong day la: ',t);
end
else writeln('vui long nhap lai');
readln;
end.
![](https://rs.olm.vn/images/avt/0.png?1311)
a)
Program bt;
Var a,b,c,tb:real;
Begin
Writeln('nhap a:=');
Readln(a);
Writeln('nhap b:=');
Readln(b);
Writeln('nhap c:=');
Readln(c);
tb:=a+b+c/3;
Writeln('diem trung binh cua ba mon:=',tb);
Readln;
End.
b)
Program bt;
Var tb:real;
Begin
Writeln('nhap tb:=');
Readln(tb);
if tb >=8,0 then writeln('hoc luc gioi') else writeln('hoc luc kha');
Readln;
End.