Question: Write a program using c++ language. It is the olive oil extraction () season. Farmers collect the olive from the trees and fill them in

Write a program using c++ language.

It is the olive oil extraction () season. Farmers collect the olive from the trees and fill them in special bags in order to send them to the places where they extract oil from them. Each bag hold around 100kg of olive. Assume we have two special kinds of olive; the first one (type A) produces one regular tank (16kg) of oil for every bag of olive. The second type of olive (type B) produces one regular tank (16kg) and an extra 2kg of oil. write a c++ program that displays how mank tanks of oil can be produces based on the olive type. Each part of an oil tank will be assumed one tank. Constraints all numbers are integers Input Format two space-separated values x and y where x is the olive type A or B y is the number of olive bags Output Format one integer represents the number of regular oil tanks produced (one of them might not be full) Sample #1 Input A 500 Output 5 Explanation Since the olive is of type A and we have 500/100=5 big bags (each one tank) Sample #2 Input B 600 Output 7 Explanation Since the olive is of type B and we have 600/100=6 big bags 6 bags produces 6*18=108 108/16 = 6.75 which means 7 tanks

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!