What's new

Infinite value switch case

Status
Not open for further replies.

potatoXfries

Eternal Poster
Joined
Feb 9, 2018
Posts
690
Reaction
604
Points
435
pa'no i convert into case statement yung 32,000 and above
Screenshot_2021-11-27-11-51-04-59.jpg

thanksss poo
 

Attachments

Code:
income = 45000;
switch(income){
   case income>0 && income<8000:
          //process here
          break;
  case income>8000 && income<32000:
          //process here
          break;
   case income>32000:
          //process here
          break;
   default:
        cout<<"Error income must be positive";
}
 
Status
Not open for further replies.

Similar threads

Back
Top