-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHomework2.cpp
More file actions
131 lines (116 loc) · 2.42 KB
/
Copy pathHomework2.cpp
File metadata and controls
131 lines (116 loc) · 2.42 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
// #include<iostream>
// using namespace std ;
// int main() {
// int amount = 1330 ;
// int 100notes , 50notes , 20notes , 1notes ;
// switch(amount>=100){
// case 1 :
// 100note = amount/100 ;
// break;
// }
// switch (amount>=20)
// {
// case 1:
// 20notes = amount/20 ;
// break;
// }
// switch (amount>=1)
// {
// case 1 :
// {1notes = amount/1
// break;
// }
// }
// return 0 ; }
// #include<iostream>
// using namespace std;
// int main()
// {
// int amount;
// int n1,n2,n5,n10,n20,n50,n100,n500;
// n1 = n2 = n5 = n10 = n20 = n50 = n100 = n500 =0;
// cout<<"Please Enter Your total Amount to find the notes : ";
// cin>>amount;
// switch(amount>=500)
// {
// case 1:
// n500 = amount/500;
// amount -= n500 * 500;
// break;
// }
// switch(amount >=100)
// {
// case 1:
// n100 = amount/100;
// amount -= n100 * 100;
// break;
// }
// switch(amount >=50)
// {
// case 1:
// n50 = amount/50;
// amount -= n50 * 50;
// }
// switch(amount >=20)
// {
// case 1:
// n20 = amount/20;
// amount -= n20 * 20;
// break;
// }
// switch(amount >=10)
// {
// case 1:
// n10 = amount/10;
// amount -= n10 * 10;
// break;
// }
// cout << "500 = " << n500 <<endl;
// cout << "100 = " << n100 <<endl;
// cout << "50 = " << n50 <<endl;
// cout << "20 = " << n20 <<endl;
// cout << "10 = " << n10 <<endl;
// }
// #include<iostream>
// using namespace std ;
// int main() {
// int sum = 0 ;
// cout<<"this are all the element" ;
// int arry[5]={1,3,4,6,6} ;
// for(int i = 0 ; i<=6 ; i++){
// cout<<i<<" " ;
// sum = sum +i ;
// }
// cout<<endl ;
// cout<<"the sum of this all arrays are : "<<sum ;
// }
// #include<iostream>
// using namespace std;
// bool search(int arry[], int size, int key) {
// for (int i = 0; i < size; i++) {
// if (arry[i] == key) {
// return true;
// }
// }
// return false;
// }
// int main() {
// int arry[10] = {1, 43, 5, 352, 54, 34, 34, 24, 37, 35};
// int key;
// cout << "Enter the key which you want to find: ";
// cin >> key;
// bool found = search(arry, 10, key);
// if (found) {
// cout << "Key is present";
// } else {
// cout << "Key is absent";
// }
// return 0;
// }
#include<iostream>
#include<cmath>
using namespace std ;
int main() {
cout<<min(2,3,4)<<endl ;
return 0 ;
}