-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path11.cpp
More file actions
57 lines (51 loc) · 668 Bytes
/
11.cpp
File metadata and controls
57 lines (51 loc) · 668 Bytes
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
//11. 논리형식 bool
//12. string 형식 개요
//#include <iostream>
//using namespace std;
//
//bool IsEvenNumber(int num)
//{
// return num % 2 == 0;
//}
//
//int main()
//{
// bool check = false;
// int num = 0;
//
//
// cout << "정수:";
// cin >> num;
//
// check = IsEvenNumber(num);
//
// if (check)
// {
// cout << "짝수" << endl;
// }
//
// else
// {
// cout << "홀수" << endl;
// }
// return 0;
//}
//-------------------------------------
#include <iostream>
#include <string>
using namespace std;
int main()
{
string s = "hello";
string s2;
s2 = s;
if (s == s2)
{
cout << "같아요." << endl;
}
else
{
cout << "달라요" << endl;
}
return 0;
}