Skip to content

Commit 1f698ec

Browse files
authored
Merge pull request #11 from marlonwq/Vetores-Matrizes
Vetores matrizes
2 parents 1297e13 + 56ba3b5 commit 1f698ec

File tree

16 files changed

+209
-0
lines changed

16 files changed

+209
-0
lines changed
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#include <iostream>
2+
#include <vector>
3+
using namespace std;
4+
5+
int main() {
6+
int N, C;
7+
cin >> N;
8+
int caixas[N];
9+
for (int i = 0; i < N; i++) {
10+
cin >> caixas[i];
11+
}
12+
cin >> C;
13+
for (int i = 0; i < N; i++) {
14+
if (caixas[i] == C) {
15+
cout << C << endl;
16+
return 0;
17+
}
18+
}
19+
cout << -1 << endl;
20+
}

0 commit comments

Comments
 (0)