查售货机价格

#include 
int main()
{
	int x,sum=0,i=0;
	scanf("%d",&x);	
	
	if(i=0;i<=5;i++){
   scanf("[1] select crisps\n");
	scanf("[2] select popcorn\n");
	scanf("[3] select chocolate\n");
	scanf("[4] select cola\n");
	scanf("[0] exit\n");
	


		switch(x){
			case 1:
				printf("3.0");
				sum++;
				break;
			case 2:
				printf("2.5");
				sum++;
				break;
			case 3:
				printf("4.0");
				sum++;
				break;
			case 4:
				printf("3.5");
				sum++;
				break;
			case 0:
				return 0;
				break;
			default :
				printf("0");
		}
	}
	
   return 0;
}

你可能感兴趣的:(查售货机价格)