![](https://rs.olm.vn/images/avt/0.png?1311)
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.
![](https://rs.olm.vn/images/avt/0.png?1311)
Các câu hỏi dưới đây có thể giống với câu hỏi trên
![](https://rs.olm.vn/images/avt/0.png?1311)
21 tháng 12 2021
#include <bits/stdc++.h>
using namespace std;
double a,b,tb;
int main()
{
cin>>a>>b;
tb=(a+b)/2;
cout<<fixed<<setprecsion(1)<<tb;
return 0;
}
![](https://rs.olm.vn/images/avt/0.png?1311)
14 tháng 4 2022
#include <bits/stdc++.h>
using namespace std;
long long i;
int main()
{
for (i=20; i>=15; i--) cout<<i<<" ";
return 0;
}
HD
1
b)
uses crt;
var a:array[1..100]of integer;
i,n,t1,t2:integer;
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
t1:=0;
t2:=0;
for i:=1 to n do
begin
if a[i]>0 then t1:=t1+a[i];
if a[i]<0 then t2:=t2+a[i];
end;
writeln('Tong cac so duong la: ',t1);
writeln('Tong cac so am la: ',t2);
readln;
end.
a)
uses crt;
var a:array[1..100]of integer;
i,n,t:integer;
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
t:=0;
for i:=1 to n do
t:=t+a[i];
writeln(t);
readln;
end.