In this class, I learned the conditional statement 'Switch' case.
When setting conditions for an specific action, 'Switch' case complete the condition statement by directly specifying each condition.
#include <stdio.h>
#include <stdlib.h>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main(int argc, char *argv[]) {
switch(value) {
case value1:
action1;
break;
case value2:
action2;
break;
case value3:
action3;
break;
return 0;
}
'Study Meeting > 빡공단 30기' 카테고리의 다른 글
[Day 14] 'Number Baseball Game' in C Programming (2) | 2023.01.16 |
---|---|
[Day 13] Repeated Statement: for and while (0) | 2023.01.13 |
[Day 11] Conditional Statement 1: if and else (0) | 2023.01.11 |
[Day 10] Operator 3: Bitwise Shift Operator (0) | 2023.01.11 |
[Day 9] Operator 2: Logical Operators and Bit operators in C Language (0) | 2023.01.10 |