/* Bill owns a small apple orchard. Every Saturday, he sells baskets of apples at the local market exclusively to his neighbors Sally and Jeff. The apples are sold in the following manner: 1. Bill reserves 2 baskets for Jeff. 2. Bill sells 3/5 of his baskets to Sally (rounded down to the nearest basket). 3. Bill sells the remaining baskets plus the reserved baskets to Jeff. Assume Bill always has at least 2 baskets to sell. Write a program for Bill that calculates how many baskets Sally and Jeff will buy and how much they will owe him. Prompt the user to enter the number of baskets available and the price per basket. Make sure the cost is printed with two digit precision (i.e., "%.2f" in printf). ============= START OF SAMPLE RUN ======================= Number of baskets: 12 Price per basket: 5.35 Sally will buy 6 baskets for $32.10 Jeff will buy 6 baskets for $32.10 ============= END OF SAMPLE RUN ======================= */ #include #include int main() { int baskets, Sally, Jeff; double price; printf("Number of baskets: "); scanf("%d", &baskets); printf("Price per basket: "); scanf("%lf", &price); baskets -= 2; Sally = (3 * baskets) / 5; Jeff = 2 + (baskets - Sally); printf("\n"); printf("Sally will buy %d baskets for $%.2f\n", Sally, Sally * price); printf("Jeff will buy %d baskets for $%.2f\n", Jeff, Jeff * price); system("pause"); return 0; }