Ken Ekholm

Ken Ekholm

  • NA
  • 11
  • 1.5k

How to use switch case instead of if statements?

Jun 12 2023 10:20 AM

Is it possible to use switch case instead of if statements with the code below this text?

if number > 20
{
    ............
}

if number > 30
{
    ............
}


if number > 50
{
    ............
}

if number > 70
{
    ............
}

 


Answers (3)