2. Viết chương trình nhập dãy n số nguyên và in ra số lớn nhất (Max) của dãy. Yêu cầu sử dụng hàm MAX(a) để tìm giá trị lớn nhất (Max). 3.Viết chương trình cho phép nhập một xâu từ bàn phím. Thực hiện in ra các chữ số có trong xâu. Yêu cầu sử dụng hàm inso(s) để in ra các chữ số có trong xâu s
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)
\(\sqrt{x^2-x-1}=\sqrt{x-1}\)
\(\Leftrightarrow\left\{{}\begin{matrix}x-1\ge0\\x^2-x-1=x-1\end{matrix}\right.\)
\(\Leftrightarrow\left\{{}\begin{matrix}x\ge1\\x^2-2x=0\end{matrix}\right.\)
\(\Leftrightarrow\left\{{}\begin{matrix}x\ge1\\\left[{}\begin{matrix}x=0\\x=2\end{matrix}\right.\end{matrix}\right.\)
\(\Rightarrow x=2\)
![](https://rs.olm.vn/images/avt/0.png?1311)
![](https://rs.olm.vn/images/avt/0.png?1311)
\(n_{Cl_2}=\dfrac{6,1975}{24,79}=0,25mol\\ 2KMnO_4+16HCl\xrightarrow[]{}2KCl+2MnO_2+5Cl_2+8H_2O\)
0,1 0,8 0,1 0,1 0,25 0,4
\(m=m_{KMnO_4}=0,1.158=15,8g\\ a=C_{M_{HCl}}=\dfrac{0,8}{0,1}=8M\\ b)n_{NaOH}=0,3.1=0,3mol\\ 2NaOH+Cl_2\rightarrow NaCl+NaClO+H_2O\\ \Rightarrow\dfrac{0,3}{2}< \dfrac{0,25}{1}=>Cl_2.dư\\ n_{NaCl}=n_{NaClO}=\dfrac{1}{2}n_{NaOH}=0,15mol\\ C_{M_{NaCl}=}C_{M_{NaClO}}=\dfrac{0,15}{0,3}=0,5M\)
![](https://rs.olm.vn/images/avt/0.png?1311)
Online learning offers a unique blend of convenience and self-directed study. Students can tailor their learning pace, revisiting lectures or pausing to take notes as needed. The flexibility allows them to fit studies around their work or personal life, learning anytime and anywhere with an internet connection. This empowers them to organize their own study schedule, maximizing their learning potential. However, online learning also presents challenges. Technical difficulties can disrupt the learning process, and long hours spent in front of a computer screen can lead to fatigue. Perhaps the biggest drawback is the lack of face-to-face interaction. Online discussions can't fully replicate the energy and exchange of ideas that occur in a traditional classroom setting.
![](https://rs.olm.vn/images/avt/0.png?1311)
Số cách chọn 5 trong số 12 cuốn sách là \(C^5_{12}\)
Ta đi tính số cách chọn 5 trong 12 cuốn sách sao cho không có cả 3 loại sách trong số sách còn lại.
TH1: Chọn 5 quyển sách toán \(\Rightarrow\) Có 1 cách.
TH2: Chọn 4 quyển sách văn và 1 quyển sách khác \(\Rightarrow\) Có 8 cách.
TH3: Chọn 3 quyển sách anh và 2 quyển sách khác \(\Rightarrow\) Có \(C^2_9=36\) cách.
Vậy có tất cả \(1+8+36=45\) cách chọn 5 quyển sách sao cho trong số sách còn lại không chứa cả 3 loại sách.
\(\Rightarrow\) Có \(C^5_{12}-45=747\) cách chọn thỏa mãn ycbt.
![](https://rs.olm.vn/images/avt/0.png?1311)
A(-1;1); B(1;3); C(1;-1)
\(AB=\sqrt{\left(1+1\right)^2+\left(3-1\right)^2}=2\sqrt{2}\)
\(AC=\sqrt{\left(1+1\right)^2+\left(-1-1\right)^2}=\sqrt{2^2+2^2}=2\sqrt{2}\)
\(BC=\sqrt{\left(1-1\right)^2+\left(-1-3\right)^2}=4\)
Chu vi tam giác ABC là:
\(AB+AC+BC=2\sqrt{2}+2\sqrt{2}+4=4\sqrt{2}+4\)
Xét ΔABC có \(AB^2+AC^2=BC^2\)
nên ΔABC vuông tại A
Xét ΔABC vuông tại A có AB=AC
nên ΔABC vuông cân tại A
=>\(S_{ABC}=\dfrac{1}{2}\cdot AB\cdot AC=\dfrac{1}{2}\cdot2\sqrt{2}\cdot2\sqrt{2}=4\)
#include <bits/stdc++.h>
using namespace std;
long long a[1000007];
long long n;
void kq()
{
long long ans=-1e18;
for(int i=1; i<=n; i++)
{
ans=max(ans, a[i]);
}
cout<<ans;
}
int main()
{
cin>>n;
for(int i=1; i<=n; i++)
{
cin>>a[i];
}
kq();
}