Ŀ

գҪıйص䡣
ѯˮĵۡ4ˮƻ(apples)(pears)(oranges)(grapes)۷ֱ3.00Ԫ/2.50Ԫ/4.10Ԫ/10.20Ԫ/
Ļʾ²˵(źѡ)ûѯˮĵۣѯ5ʱԶ˳ѯ5ʱûѡ˳
û14ʾӦˮĵ(1λС)0˳ѯţʾ۸Ϊ0
ʾ˵

3   (orangesı) 
0   (˳ѯ) 

[1] apples
[2] pears
[3] oranges
[4] grapes
[0] Exit
price = 4.1
[1] apples
[2] pears
[3] oranges
[4] grapes
[0] Exit



#include <stdio.h>
int main(void)
{
    int choice, i;
    double price;

    for(i = 1; i <= 5; i++){
        printf("[1] apples\n");
        printf("[2] pears\n");
        printf("[3] oranges\n");
        printf("[4] grapes\n");
        printf("[0] Exit\n");
        scanf("%d", &choice);
        if(choice == 0)
            break;
        else{
/*---------*/
      	    printf("price = %0.1f\n", price);
        }
    }
}
