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..10]of integer;
i,n,dem:integer;
begin
clrscr;
for i:=1 to 10 do
begin
repeat
write('A[',i,']='); readln(a[i]);
until a[i]>0;
end;
writeln('Day so vua nhap la: ');
for i:=1 to 10 do
write(a[i]:4);
dem:=0;
for i:=1 to n do
if a[i] mod 2=0 then inc(dem);
writeln;
writeln('So luong so chan la: ',dem);
readln;
end.
#include <bits/stdc++.h>
using namespace std;
long long n,i,x,dem,t;
int main()
{
cin>>n;
dem=0;
t=0;
for (i=1; i<=n; i++)
{
cin>>x;
if (x%3==0)
{
dem++;
t+=x;
}
}
cout<<dem<<" "<<t;
return 0;
}
uses crt;
var a:array[1..255]of integer;
i,n,k,kt:integer;
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
write('Nhap k='); readln(k);
kt:=0;
for i:=1 to n do
if a[i]=k then kt:=1;
if kt=0 then writeln(k,' khong co trong day')
else writeln(k,' co trong day');
readln;
end.
\(\dfrac{s}{13}=\dfrac{2s}{3-vn}+\dfrac{2s}{3+vn}\)
\(\dfrac{s}{13}=\dfrac{2s\left(3+vn\right)+2s\left(3-vn\right)}{9-vn^2}\)
\(\dfrac{s}{13}=\dfrac{12s}{9-vn^2}\)
\(s\left(9-vn^2\right)=12s\cdot13\)
\(s\left(9-vn^2\right)=156s\)
\(9-vn^2=156\)
\(vn^2=-147\)
uses crt;
var a:array[1..100]of integer;
i,n,min:integer;
begin
clrscr;
readln(n);
for i:=1 to n do readln(a[i]);
min:=a[1];
for i:=1 to n do
if min>a[i] then min:=a[i];
writeln(min);
readln;
end.
Program HOC24;
var a: array[1..32000] of integer;
ucln,i,n,ucln1: integer;
function uc(x,y: integer): integer;
var tg: integer;
begin
while y<>0 do
begin
tg:=x mod y;
x:=y;
y:=tg;
end;
uc:=x;
end;
begin
write('Nhap N: '); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
ucln1:=uc(a[1],a[2]);
for i:=3 to n do ucln:=uc(ucln1,a[i]);
write('Uoc chung lon nhat cua day so la: ',ucln);
readln
end.
#include <bits/stdc++.h>
using namespace std;
long long n,a[1000],m,i;
bool kt;
{
cin>>n;
for (i=1; i<=n; i++) cin>>a[i];
cin>>m;
kt=false;
for (i=1; i<=n; i++)
if (a[i]==m) kt=true;
if (kt==true) cout<<"Co";
else cout<<"Khong";
return 0;
}
#include <bits/stdc++.h>
using namespace std;
long long a[200],n,i;
int main()
{
cin>>n;
for (i=1; i<=n; i++)
cin>>a[i];
sort(a+1,a+n+1);
for (i=1; i<=n; i++) cout<<a[i]<<" ";
return 0;
}
Program Hoc24;
var a: array[1..32000] of integer;
d,i,n,x: integer;
begin
write('Nhap N: '); readln(n);
for i:=1 to n do
begin
write('Nhap so thu ',i,': '); readln(a[i]);
end;
write('Nhap so can tim: '); readln(x);
d:=0;
for i:=1 to n do if a[i]=x then d:=d+1;
if d>0 then write('Co so can tim trong day ban dau') else write('Khong co so can tim trong day ban dau');
readln
end.
uses crt;
var a:array[1..100]of integer;
n,i,x,kt:integer;
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
write('Nhap so can tim: '); readln(x);
kt:=0;
for i:=1 to n do
if a[i]=x then kt:=1;
if kt=0 then writeln(x,' khong co trong day')
else writeln(x,' co trong day');
readln;
end.