- 2
- 0
- 约2.26千字
- 约 29页
- 2021-12-06 发布于北京
- 举报
1/;2/;3/;4/;#include stdio.h
Int main(void)
{ int choice, i; double price;
for( i = 1; i = 5; i++) {
printf([1] Select crisps \n);
printf([2] Select popcorn \n);
printf([3] Select chocolate \n);
printf([4] Select cola \n);
printf([0] exit \n);
? printf(Enter choice: );
scanf(%d, choice);
? if(choice == 0) break;
switch (choice) {
case 1: price=3.0; break;
case 2: price=2.5; break;
case 3: price=4.0; break;
case 4: price=3.5; break;
default: price=0.0; br
原创力文档

文档评论(0)