Skip to content

Commit 8494d08

Browse files
committed
Soluções 1, 2, 3
1 parent 586ab7a commit 8494d08

File tree

3 files changed

+47
-0
lines changed
  • Nível 1 - Lógica/3 - Estrutura de Repetição/exercícios/soluções/marlonwq

3 files changed

+47
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#include <iostream>
2+
using namespace std;
3+
4+
int main (){
5+
int N;
6+
cin >> N;
7+
for (int i = 0; i <= 100; i++){
8+
cout << N * i << endl;
9+
}
10+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#include <iostream>
2+
using namespace std;
3+
4+
int main (){
5+
int N;
6+
cin >> N;
7+
for (int i = 0; i < N; i++){
8+
int P, M;
9+
cin >> P >> M;
10+
cout << P + M << endl;
11+
}
12+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#include <iostream>
2+
using namespace std;
3+
4+
int main() {
5+
int N;
6+
cin >> N;
7+
8+
int tradicional = 0;
9+
int geleia = 0;
10+
11+
for (int i = 0; i < N; i++) {
12+
int num;
13+
cin >> num;
14+
if (num == 10) {
15+
tradicional++;
16+
} else if (num == 11) {
17+
geleia++;
18+
}
19+
}
20+
if (tradicional > geleia) {
21+
cout << "Tradicional" << endl;
22+
} else {
23+
cout << "Geleia" << endl;
24+
}
25+
}

0 commit comments

Comments
 (0)