a and b are both int variables.
switch (a) { case 0: b ++; break; case 1: case -2: b *= 2; break; case 4: b = 10 * a; default: b *= a;}
How would I write this as a if else statement in as simple of a manner as possible?
Aucun commentaire:
Enregistrer un commentaire