-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfirst.cpp
More file actions
47 lines (40 loc) · 899 Bytes
/
first.cpp
File metadata and controls
47 lines (40 loc) · 899 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#include<algorithm>
#include<iostream>
#include<climits>
using namespace std;
// void execute(int arr[],int size){
// for (int i=0;i<size;i++){
// cout<<arr[i]<<" ";
// }
// cout<<endl;
// cout<<"successfully executed"<<endl;
// }
int givemax(int arr[],int n){
int max= INT_MIN;
for (int i=0;i<n;i++){
if (arr[i]>max){
arr[i]=max;
}
}
return max;
}
int main(){
int arr[5] = {12,34,22,11,4};
sort(arr,arr + 5);
for(int i=0;i<5;i++){
cout<<arr[i]<<" ";
}
int arr[10];
fill_n(arr,9,2);
for(int i = 0;i<10;i++){
cout<<arr[i]<<" ";
}
// int first[50]={32,14};
// execute(first,10);
// int first[6] ;
// float first[6];
// char first[9];
// bool first[8];
// double first [9];
return 0;
}