Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
Tags
- W3Schools
- 프로그래밍
- dynamic
- Basic
- Unity
- 파이썬
- python
- 오류
- 백준
- 시작해요 언리얼 2022
- github
- UE5
- Class
- DP
- guide
- Algorithm
- w3school
- Material
- String
- dfs
- C#
- c++
- parameter
- Programming
- 문제풀이
- Tutorial
- 재귀
- Unreal Engine 5
- 기초
- loop
Archives
- Today
- Total
행복한 개구리
C++ Tutorial - Booleans / Boolean Expressions 본문

참거짓 표현식
참거짓 표현식은 참거짓값을 반환하는 C++ 표현식입니다: 1 (참) 또는 0 (거짓)
당신은 초과 연산자( > )와 같은 비교 연산자를 사용하여 표현식(또는 변수)이 참인지 알아낼 수 있습니다.
예시
#include <iostream>
using namespace std;
int main() {
int x = 10;
int y = 9;
cout << (x > y);
}

또는 더 쉽게 만들어보면:
예시
#include <iostream>
using namespace std;
int main() {
cout << (10 > 9);
}

아래에 있는 예시에서는 우리는 동치 연산자 ( == )를 사용하여 표현식을 평가해 볼 것입니다.
예시
#include <iostream>
using namespace std;
int main() {
int x = 10;
cout << (x == 10);
}

예시
#include <iostream>
using namespace std;
int main() {
cout << (10 == 15);
}

참거짓타입은 C++비교와 조건들의 근간이 됩니다.
당신은 다음 조건 챕터에서 더 많은 것을 배울 것입니다.
'C++ > 공부내용' 카테고리의 다른 글
| C++ Tutorial - Conditions / Else (0) | 2022.06.14 |
|---|---|
| C++ Tutorial - Conditions / If (0) | 2022.06.14 |
| C++ Tutorial - Booleans / Boolean Values (0) | 2022.06.14 |
| C++ Tutorial - Math (0) | 2022.06.14 |
| C++ Tutorial - Strings / Omitting Namespace (0) | 2022.06.13 |