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)
#include <bits/stdc++.h>
using namespace std;
long long a[1000],i,n,vt,nn;
int main()
{
cin>>n;
for (i=1; i<=n; i++) cin>>a[i];
nn=a[1];
for (i=1; i<=n; i++) nn=min(nn,a[i]);
vt=0;
for (i=1; i<=n; i++) if (min==a[i]) vt=i;
cout<<nn<<endl;
cout<<vt;
return 0;
}
![](https://rs.olm.vn/images/avt/0.png?1311)
uses crt;
const fi='ketqua.out';
var f1:text;
a:array[1..100]of integer;
i,n,min:integer;
begin
clrscr;
assign(f1,fi); rewrite(f1);
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
min:=a[1];
for i:=1 to n do
if min>a[i] then min:=a[i];
writeln(f1,min);
close(f1);
readln;
end.
![](https://rs.olm.vn/images/avt/0.png?1311)
#include <bits/stdc++.h>
using namespace std;
int A[50],i,n,ln;
int main()
{
cin>>n;
for (int i=1; i<=n; i++) cin>>A[i];
ln=INT_MIN;
for (int i=1; i<=n; i++)
if (A[i]%2==0 && ln<=A[i]) ln=A[i];
cout<<ln;
}
![](https://rs.olm.vn/images/avt/0.png?1311)
var a:array [1..100] of integer;
i,n,x : byte;
min:integer;
begin
write('Dãy có số phần tử là : '); readln(N);
for i:=1 to n do begin
write('A[',i,'] = ');
readln(A[i]);
end;
Min : = A[1];
for i:=2 to n do if A[i] < min then begin
min:= A[i];
x:=i;
end;
write('Phần tử bé nhất trong dãy là : A[',x,']');
readln
end.
![](https://rs.olm.vn/images/avt/0.png?1311)
#include <bits/stdc++.h>
using namespace std;
double b[100],x,ln,t;
int i,n,dem;
int main()
{
cin>>n;
ln=-1e10;
for (i=1; i<=n; i++)
{
cin>>b[i];
ln=max(ln,b[i]);
}
for (i=1; i<=n; i++)
cout<<b[i]<<" ";
cout<<endl;
cout<<ln<<endl;
t=0;
dem=0;
for (i=1; i<=n; i++)
if (a[i]>x)
{
t=t+a[i];
dem++;
}
cout<<fixed<<setprecision(2)<<t/(dem*1.0);
return 0;
}
![](https://rs.olm.vn/images/avt/0.png?1311)
uses crt;
var a:array[1..200]of integer;
i,n,max:integer;
begin
clrscr;
write('Nhap n='); readln(n);
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];
writeln('Gia tri lon nhat la: ',max);
write('Vi tri la: ');
for i:=1 to n do
if max=a[i] then write(i:4);
readln;
end.
#include <bits/stdc++.h>
using namespace std;
long long x,ln,i,n;
int main()
{
cin>>n;
ln=LLONG_MIN;
for (i=1; i<=n; i++)
{
cin>>x;
ln=max(ln,x);
}
cout<<ln;
return 0;
}
Mik hc pascal bn ơii