书上题目加油站油品选择,之后不同油品又不同价格,怎么解决?
switch(油品){ case 油品1: 执行1;break; case 油品2: 执行2;break; case 油品3: 执行3;break; default: 执行4;break; }