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 | 29 | 30 | 31 |
Tags
- programming
- 파이썬
- baekjoon
- const
- C++
- 티스토리챌린지
- Python
- array
- 배열
- Data Science
- Pre-processing
- 오블완
- 함수
- string
- raw data
- Object Oriented Programming
- pointer
- vscode
- OOP
- Deep Learning
- assignment operator
- 백준
- 알고리즘
- 포인터
- predictive analysis
- pass by reference
- 문자열
- Class
- 반복문
- function
Archives
- Today
- Total
목록전체 글 (188)
Channi Studies
[C++] Conditional Operator (조건 연산자)
Conditional Operator는 다음과 같은 형식으로 사용됩니다. variable = (cond_expr) ? expr1 : expr2 다음은 예시 코드입니다. #include using namespace std; int main(){ int a{10}, b{20}; int score {92}; int result {}; // a > b 이면 result = a, b > a 이면 result = b result = (a > b) ? a : b; // score > 90 이면 Excellent! 출력 // score b) ? a : b; 는 다음과 동일합니다 if (a > b) { result = a; }else{ result = b; } 여러 줄의 if-else문을 한줄로 치환할 수 있기 때문에,..
C++/반복문 (Loop)
2023. 12. 8. 22:25
lhs op= rhs 의 방식으로 작동한다. ex) cost += item * tax // cost = cost + (item * tax)
C++/기타
2023. 12. 7. 17:23
C++에서 boolean값을 기본적으로 1 for true, 0 for false로 출력된다. 하지만, true/false로 출력되는 것이 더욱 유용한 경우도 많다. 이럴 때, 코드에 cout
C++/기타
2023. 12. 7. 12:33