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.
#include <bits/stdc++.h>
using namespace std;
long long x,n,i,t,dem;
int main()
{
cin>>n;
dem=0;
t=0;
for (i=1; i<=n; i++)
{
cin>>x;
if (x%2==0 && x>10) t+=x;
if (x%2!=0 || x<100) dem++;
}
cout<<t<<" "<<dem;
return 0;
}
uses crt;
var t,n,m:longint;
//chuongtrinhcon
function gt(k:longint):longint;
var i,a:integer;
begin
a:=1;
for i:=1 to k do
a:=a*i;
gt:=a;
end;
//chuongtrinhchinh
begin
clrscr;
readln(n,m);
writeln(gt(n)+gt(m);
readln;
end.
uses crt;
var a:array[1..250]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);
writeln('Vi tri cua no trong mang la: ');
for i:=1 to n do
if max=a[i] then write(i:4);
readln;
end.
uses crt;
var a:array[1..100]of integer;
i,n,dem,t:integer;
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
writeln('Cac so chan la: ');
dem:=0;
t:=0;
for i:=1 to n do
if a[i] mod 2=0 then
begin
write(a[i]:4);
t:=t+a[i];
inc(dem);
end;
writeln('Tong cac so chan la: ',t);
writeln('Trong day co ',dem,' so chan');
readln;
end.
1:
uses crt;
const fi='ketqua.txt';
var f1:text;
st:string;
i,d:integer;
begin
clrscr;
assign(f1,fi); rewrite(f1);
write('Nhap xau:'); readln(st);
d:=length(st);
for i:=1 to d do
if st[i]=#32 then delete(st,i,1);
writeln(f1,st);
close(f1);
end.
2:
uses crt;
var a,b,c,d:integer;
{----------chuong-trinh-con-----------------------}
function min(x,y:integer):integer;
begin
if x<y then min:=x
else min:=y;
end;
{---------------chuong-trinh-chinh--------------------}
begin
clrscr;
write('a='); readln(a);
write('b='); readln(b);
write('c='); readln(c);
write('d='); readln(d);
writeln(min(a,min(b,min(c,d))));
readln;
end.
uses crt;
var a,b,c:string;
i,d1,d2:integer;
begin
clrscr;
write('Nhap xau a:'); readln(a);
write('Nhap xau b:'); readln(b);
d1:=length(a);
d2:=length(b);
writeln('Tong do dai hai xau la: ',d1+d2);
c:=#32;
for i:=1 to d1 do
if (a[i] in ['A'..'Z']) or (a[i] in ['a'..'z']) then c:=c+a[i];
for i:=1 to d2 do
if b[i] in ['0'..'9'] then c:=c+b[i];
writeln('Xau c la: ',c);
readln;
end.
uses crt;
var a:array[1..100]of integer;
i,n,min:integer;
begin
clrscr;
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(min);
readln;
end.
Câu 3:
#include <bits/stdc++.h>
using namespace std;
string a[1000];
int n,i,dem;
int main()
{
cin>>n;
dem=0;
for (i=1; i<=n; i++)
{
cin>>a[i];
if (a[i]=='a') dem++;
}
cout<<dem;
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\)