Skip to content

Commit 39e706b

Browse files
authored
Add files via upload
1 parent 6f2c6c6 commit 39e706b

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#include<iostream>
2+
using namespace std;
3+
int main()
4+
{
5+
int A[10]={5,8,3,9,6,2,10,7,-1,4};
6+
int n=sizeof(A)/sizeof(int);
7+
int max=A[0];
8+
int min=A[0];
9+
for (int i=0;i<n;i++)
10+
{
11+
if (A[i]<min)
12+
min=A[i];
13+
else if (A[i]>max)
14+
max=A[i];
15+
}
16+
cout<<"Maximun is "<<max<<endl<<"Minimum is "<<min <<endl;
17+
return 0;
18+
}

0 commit comments

Comments
 (0)