Problem: Qty: X Machine A Total? Current |Sol A Sol B Machine B KQty: 1 Machine A takes in X units of solution A and generates solution B and machine B takes in one unit of solution B and generates...



  • Use the C programming language. Do not use any other programming language like Python.

  • Write one C file only for this problem.

  • Only use variable declarations, assignments, operations, conditional constructs, and iterative constructs.


    • Input should be taken in a value from the user (use scanf).

    • Be sure to use loops to complete the solution.

    • The use of functions is optional.



Problem:<br>Qty: X Machine A<br>Total?<br>Current<br>|Sol A<br>Sol B<br>Machine B KQty: 1<br>Machine A takes in X units of solution A and generates solution B and machine B takes in one unit of solution B and generates solution A. At the moment there is a current stock of<br>solution A and no amount of solution B. How much solution B was fed to machine B in total?<br>The program will ask the current stock of solution A. The next thing asked is how much the cost X of solution A is needed for the solution B to be made. It then displays the total amount<br>of solution B that was generated in total. Assume that cost X will always be 2 or greater and that the current and bought amount are non-negative.<br>Sample Input and Output:<br>Current: 9 Current: 10 Current: 16<br>Cost X:3 Cost X: 2 Cost X: 2<br>Total :4 Total :9<br>Total : 15<br>

Extracted text: Problem: Qty: X Machine A Total? Current |Sol A Sol B Machine B KQty: 1 Machine A takes in X units of solution A and generates solution B and machine B takes in one unit of solution B and generates solution A. At the moment there is a current stock of solution A and no amount of solution B. How much solution B was fed to machine B in total? The program will ask the current stock of solution A. The next thing asked is how much the cost X of solution A is needed for the solution B to be made. It then displays the total amount of solution B that was generated in total. Assume that cost X will always be 2 or greater and that the current and bought amount are non-negative. Sample Input and Output: Current: 9 Current: 10 Current: 16 Cost X:3 Cost X: 2 Cost X: 2 Total :4 Total :9 Total : 15

Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here