Question: Select the answer set that best matches the step-by-step order of operation and output of the code, There are partial marks available if the answer
Select the answer set that best matches the step-by-step order of operation and output of the code, There are partial marks available if the answer you select is partially correct.
#include int main(void) {
int numOranges = 0;
double costOranges = .67;
double weightBananas = 0.0;
double costBananas = .59;
double total = 0.0;
printf("Enter number of oranges: "); //user enters 2
scanf("%d", & numOranges);
printf("Enter weight of bananas: "); //user enters 3.4
scanf("%lf", & weightBananas);
total = costBananas * weightBananas + costOranges * numOranges
printf("Total is equal to: $%.2lf ", total); return 0; }
| 1. | numOranges instantiated with value 0 costOranges instantiated with value .67 weightBananas instantiated with value 0.0 costBananas instantiated with value .59 total instantiated with value 0.0 user prompted to enter number of oranges user entered value read from screen and stored in numOranges user prompted to enter weight of bananas user entered value read from screen and stored in weightBananas costBananas multiplied by weightBananas and added to the result of multiplying costOranges by numberOfOranges, the result of the calculation is assigned to total Total is equal to: $3.35 is output to screen followed by a new line _____________________________________________________________________________ |
| 2 | | numOranges instantiated with value 0 costOranges instantiated with value .67 weightBananas instantiated with value 0.0 costBananas instantiated with value .59 total instantiated with value 0.0 user prompted to enter number of oranges user entered value read from screen and stored in numOranges user prompted to enter weight of bananas user entered value read from screen and stored in weightBananas costOranges multiplied by numOranges and promoted to double and added to the result of multiplying costBananas by weightBananas, the result of the calculation is assigned to total Total is equal to: $3.35 is output to screen followed by a new line _____________________________________________________________________________ | | |
| | 3. | numOranges instantiated with value 0 costOranges instantiated with value .67 weightBananas instantiated with value 0.0 costBananas instantiated with value .59 total instantiated with value 0.0 user entered value read from screen and stored in numOranges user entered value read from screen and stored in weightBananas costOranges multiplied by numOranges and promoted to double and added to the result of multiplying costBananas by weightBananas, the result of the calculation is assigned to total Total is equal to: $3.35 is output to screen followed by a new line ______________________________________________________________________________ | | |
| | 4. | user prompted to enter number of oranges user entered value read from screen and stored in numOranges user prompted to enter weight of bananas user entered value read from screen and stored in weightBananas costOranges multiplied by numOranges and promoted to double and added to the result of multiplying costBananas by weightBananas, the result of the calculation is assigned to total Total is equal to: $3.35 is output to screen followed by a new line ________________________________________________________________________________ | | |