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.
uses crt;
var a:array[1..42] of real;
i,n,dem:integer;
nn:real;
begin
clrscr;
readln(n);
for i:=1 to n do readln(a[i]);
nn:=a[1];
for i:=1 to n do
if nn>a[i] then nn:=a[i];
for i:=1 to n do
if nn=a[i] then write(i:4);
writeln;
dem:=0;
for i:=1 to n do
if a[i]>=8 then inc(dem);
writeln(dem);
readln;
end.
#include <bits/stdc++.h>
using namespace std;
long long n,i,s;
int main()
{
cin>>n;
if (n%2==0)
{
s=1;
for (i=1; i<=n; i++)
if (i%2==0) s=s*i;
cout<<s;
}
else
{
s=1;
for (i=1; i<=n; i++)
if (i%2==1) s=s*i;
cout<<s;
}
return 0;
}
uses crt;
var a:array[1..100]of real;
i,n:integer;
t:real;
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('Tong cua day la: ',t:4:2);
writeln('Trung binh cong cua day la: ',t/n:4:2);
readln;
end.
uses crt;
var a:array[1..1000]of integer;
n,i,k,min,vt:integer;
begin
clrscr;
write('Nhap n='); readln(n);
if n=0 then writeln('Moi ban nhap lai')
else begin
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
for i:=1 to n do
write(a[i]:4);
writeln;
min:=a[1];
vt:=1;
for i:=1 to n do
if min>a[i] then
begin
min:=a[i];
vt:=i;
end;
writeln('So nho nhat la: ',min,' tai vi tri: ',vt);
write('Nhap k='); readln(k);
for i:=1 to n do
if i<>k then write(a[i]:4);
end;
readln;
end.
uses crt;
var a:array[1..100]of integer;
i,n,dem:integer;
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
dem:=0;
for i:=1 to n do
if (10<a[i]) and (a[i]<20) then inc(dem);
writeln(dem);
readln;
end.
uses crt;
var a:array[1..15]of integer;
n,i,k:integer;
kt:boolean;
begin
clrscr;
readln(n);
for i:=1 to n do readln(a[i]);
readln(k);
kt:=false;
for i:=1 to n do
if a[i]=k then
begin
kt:=true;
break;
end;
for i:=1 to n do write(a[i]:4);
writeln;
if (kt=true) then writeln('Trong mang co ton tai phan tu co gia tri la K')
else writeln('Khong ton tai phan tu co gia tri la k');
readln;
end.