-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquiz.cpp
More file actions
86 lines (69 loc) · 1.19 KB
/
quiz.cpp
File metadata and controls
86 lines (69 loc) · 1.19 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
#include<iostream>
using namespace std;
//quiz2
/*
int main() {
int col{ 0 }, row{ 0 };
cout << "행의 수를 입력하세요: ";
cin >> row;
cout << "열의 수를 입력하세요: ";
cin >> col;
cout << "속이 꽉찬 네모 출력\n";
for (int i = 0; i < row; i++) {
for (int j = 0; j < col; j++) {
cout << "*";
}
cout << "\n";
}
cout << "\n속이 빈 네모 출력\n";
for (int i = 0; i < row; i++) {
if (i % row == 0 || i % row == row - 1) {
for (int j = 0; j < col; j++) {
cout << "*";
}
}
else {
for (int j = 0; j < col; j++) {
if (j % col == 0 || j % col == col - 1) {
cout << "*";
}
else {
cout << " ";
}
}
}
cout << "\n";
}
}*/
//quiz4
/*int main() {
cout << "Please enter number n: ";
int len{ 0 }, i{ 1 };
cin >> len;
while (i <= len) {
int j = 1;
while (j <= i){
cout << j;
cout << " ";
j++;
}
cout << "\n";
i++;
}
}*/
//quiz5
int maia() {
cout << "Please enter number n: ";
int len{ 0 }, i{ 1 };
cin >> len;
while (i <= len) {
int j = 1;
while (j <= i) {
cout << j;
cout << " ";
j++;
}
cout << "\n";
i++;
}
}