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 |
| ||
3.
| |||
4.
|
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started