Skip to content

Commit 7932968

Browse files
committed
2025.2.16 반복문 진행 중
1 parent 782aa1c commit 7932968

File tree

8 files changed

+140
-0
lines changed

8 files changed

+140
-0
lines changed

StepsBySteps/반복문/10950.cpp

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#include <iostream>
2+
3+
using namespace std;
4+
5+
int main() {
6+
int T;
7+
8+
cin >> T;
9+
10+
for(int i = 0; i < T; i++) {
11+
int A, B;
12+
cin >> A >> B;
13+
cout << A + B << "\n";
14+
}
15+
16+
return 0;
17+
}

StepsBySteps/반복문/11021.cpp

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#include <iostream>
2+
3+
using namespace std;
4+
5+
int main() {
6+
int T;
7+
8+
cin >> T;
9+
10+
for(int i = 1; i <= T; i++) {
11+
int A, B;
12+
13+
cin >> A >> B;
14+
15+
cout << "Case #" << i << ": " << A + B << "\n";
16+
}
17+
18+
return 0;
19+
}

StepsBySteps/반복문/11022.cpp

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#include <iostream>
2+
3+
using namespace std;
4+
5+
int main() {
6+
int T;
7+
8+
cin >> T;
9+
10+
for(int i = 1; i <= T; i++) {
11+
int A, B;
12+
13+
cin >> A >> B;
14+
15+
cout << "Case #" << i << ": " << A << " + " << B << " = " << A + B << "\n";
16+
}
17+
18+
return 0;
19+
}

StepsBySteps/반복문/15552.cpp

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#include <iostream>
2+
3+
using namespace std;
4+
5+
int main() {
6+
int T;
7+
8+
cin.tie(NULL);
9+
ios_base::sync_with_stdio(false);
10+
11+
cin >> T;
12+
13+
for(int i = 0; i < T; i++) {
14+
int A, B;
15+
16+
cin >> A >> B;
17+
18+
cout << A + B << "\n";
19+
}
20+
21+
return 0;
22+
}

StepsBySteps/반복문/25304.cpp

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#include <iostream>
2+
3+
using namespace std;
4+
5+
int main() {
6+
int X, N, sum = 0;
7+
8+
cin >> X >> N;
9+
10+
for (int i = 0;i < N;i++) {
11+
int a, b;
12+
13+
cin >> a >> b;
14+
15+
sum += a * b;
16+
}
17+
18+
if(X == sum) cout << "Yes";
19+
else cout << "No";
20+
21+
return 0;
22+
}

StepsBySteps/반복문/25314.cpp

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#include <iostream>
2+
3+
using namespace std;
4+
5+
int main() {
6+
int N;
7+
8+
cin >> N;
9+
10+
for (int i = 0;i < N/4;i++) cout << "long ";
11+
cout << "int";
12+
13+
return 0;
14+
}

StepsBySteps/반복문/2739.cpp

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#include <iostream>
2+
3+
using namespace std;
4+
5+
int main() {
6+
int N;
7+
8+
cin >> N;
9+
10+
11+
for (int i = 1; i <= 9; i++) cout << N << " * " << i << " = " << N * i << "\n";
12+
13+
return 0;
14+
}

StepsBySteps/반복문/8393.cpp

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#include <iostream>
2+
3+
using namespace std;
4+
5+
int main() {
6+
int n;
7+
8+
cin >> n;
9+
10+
cout << n * (n + 1) / 2;
11+
12+
return 0;
13+
}

0 commit comments

Comments
 (0)