switch문 tag

8 questions


1 answers
37 views
0
How do you use a switch door for Python?

I'd like to use C's switch statement in Python.I know I can replace it with an if-else statement, but it's convenient to use it like a switch.Let me know if there's a way

2 years ago

1 answers
27 views
0
I'd like to ask you a question about c++ completely beginner switch.

I'm trying to use a switch statement, but when I compile op, y, it says it's an uninitialized variable, so what's the problem?

2 years ago

2 answers
29 views
0
To process multiple cases in a switch statement in javascript at once

I want to process several values in one, but it doesn't work well because I wrote in the case. What should I do?function daysInMonth( month ){ switch(month){ case 2: return 28; break; case 4,6,9,11: r...

2 years ago

2 answers
30 views
0
Using an Array in a Switch Case Statement

char sel1[10];int teamsel;cin >> sel1;switch (*sel1) { case kt : teamsel = 1; case Fin : teamsel = 2;}I want to use it like this.How shall I do it?

2 years ago

1 answers
30 views
0
Why can't I declare a variable in the switch statement?

I thought C++ could declare a variable anywhereWhy can't you declare a variable in the switch statement?switch (val){ case 1: int newVal = 42; break; case 2: break;}

2 years ago

1 answers
25 views
0
I want to use the switch-case in Ruby

I want to use the switch-case in Ruby.I don't think there was a swich, but I'm asking here because I thought it was called another name

2 years ago

1 answers
31 views
0
JS switch statement error

<head> <meta charset=utf-8 /> <title>Performance calculation program</title> <script> var input = Number (prompt('Enter a number'); switch(input) { case number > ...

2 years ago

1 answers
28 views
0
A beginner in language c asks a question...

We are making a program to find out what year you were born using the 7th number of resident registration numbers.I don't know where it's wrong.The tin ends are wrong.Whatever number you enter, it say...

2 years ago

© 2024 OneMinuteCode. All rights reserved.