Question

The capacity of a plastic bottle is 2.3 liters. The cost of filling one bottle with petrol is 1.7 and the selling price of on Algorithm please
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Algorithm
A = read petrol amount
N = ceil(A/2.3)//finding number of bottles needed
display N//displaying number of bottles
FC = N*1.7//finding filling cost
display FC//displaying filling cost
Sp = N*2.5//finding sellling price
display Sp//displaying selling price
p = Sp-Fc//finding profit
display p//diplaying profit

//cpp program

#include<iostream>
#include<cmath>
using namespace std;
int main()
{
   double A;
   cout<<"Enter the petrol amount: ";
   cin>>A;
   cout<<"For "<<A<<" liters of petrol:\n";
   double N = ceil(A/2.3);
   cout<<"The Number of bottles is "<<N<<endl;
   double FC = N*1.7;
   cout<<"The filling cost is "<<FC<<endl;
   double Sp = N*2.5;
   cout<<"The selling price is "<<Sp<<endl;
   double p = Sp-FC;
   cout<<"The profit is "<<p<<endl;
   return 0;
}

output:

Enter the petrol amount: 50
For 50 liters of petrol:
The Number of bottles is 22
The filling cost is 37.4
The selling price is 55
The profit is 17.6


Process exited normally.
Press any key to continue . . .


Add a comment
Know the answer?
Add Answer to:
Algorithm please The capacity of a plastic bottle is 2.3 liters. The cost of filling one...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • c++ please A farmer ships bottles of olive oil to a supermarket. Each olive oil bottle...

    c++ please A farmer ships bottles of olive oil to a supermarket. Each olive oil bottle holds 2.5 liters of oil. The cost of producing one liter of olive oil is 1.2 JD, and the profit of each bottle of oil is 0.35 JD. Write a program that does the following: 1. Prompts the user to enter the total amount of oil (liters) produced. 2. Outputs the number of olive oil bottles needed to hold olive oil produced. (Round the...

  • Budget Performance Report McAlisters Bottle Company manufactures plastic two-liter bottles for the beverage industry. The cost...

    Budget Performance Report McAlisters Bottle Company manufactures plastic two-liter bottles for the beverage industry. The cost standards per 100 two-liter bottles are as follows: Cost Category Standard Cost per 100 Two-Liter Bottles Direct labor $1.52 Direct materials 5.40 Factory overhead 0.40 Total $7.32 At the beginning of May, McAlisters Bottle’s management planned to produce 580,000 bottles. The actual number of bottles produced for May was 630,000 bottles. The actual costs for May of the current year were as follows: Cost...

  • Genie in a Bottle Company (GBC) manufactures plastic two-liter bottles for the beverage industry. The cost...

    Genie in a Bottle Company (GBC) manufactures plastic two-liter bottles for the beverage industry. The cost standards per 100 two-liter bottles are as follows: Cost Category Standard Cost per 100 Two-Liter Bottles Direct labor $1.2 Direct materials 5.52 Factory overhead 0.3 Total $7.02 At the beginning of July, GBC management planned to produce 460,000 bottles. The actual number of bottles produced for July was 496,800 bottles. The actual costs for July of the current year were as follows: Cost Category...

  • 10. Wanda Lux must select a supplier for a plastic bottle and proprietary dispenser for its...

    10. Wanda Lux must select a supplier for a plastic bottle and proprietary dispenser for its new hair shampoo. Three suppliers have placed bids; at Wanda's request, all bids are for a shipping quantity (Q) of 20,000 bottles with annual requirements (D) of 40,000 units. Wanda's factory operates 250 days a year. The following table shows each supplier's price, estimated annual freight costs, and current lead times; management has added estimates for holding costs and administrative oversight costs for each...

  • Wanda Lux must select a supplier for a plastic bottle and proprietary dispenser for its new...

    Wanda Lux must select a supplier for a plastic bottle and proprietary dispenser for its new hair shampoo. Three suppliers have placed bids, at Wanda's request, all bids are for a shipping quantity (Q) of 20,000 bottles with annual requirements (D) of 40,000 units. Wanda's factory operates 250 days a year. The following table shows each supplier's price, estimated annual freight costs, and current lead times, management has added estimates for holding costs and administrative oversight costs for each supplier....

  • please be as clear and as simple as possible. I am trying to understand it. show...

    please be as clear and as simple as possible. I am trying to understand it. show me the steps, not only the answers. thank you in advance. P22-28. Computea VP Incomea n t compute brak went contribution margir marginosyro and role for argetoet income All Frute Company bottles and distributes frute de fruit drink. The beverage is sold for 50 cents per 16-ounce bottle to retailers per bottle. For the year 2004, management estimate the following and costs. 250.000 Manufacturing...

  • please be as clear and as simple as possible. I am trying to understand it. show...

    please be as clear and as simple as possible. I am trying to understand it. show me the steps, not only the answers. thank you in advance. P22-28. Computea VP Incomea n t compute brak went contribution margir marginosyro and role for argetoet income All Frute Company bottles and distributes frute de fruit drink. The beverage is sold for 50 cents per 16-ounce bottle to retailers per bottle. For the year 2004, management estimate the following and costs. 250.000 Manufacturing...

  • please be as clear and as simple as possible. I am trying to understand it. show...

    please be as clear and as simple as possible. I am trying to understand it. show me the steps, not only the answers. thank you in advance. P22-20 Compute a CVP income statement, compute break even poist, contribution margin ratio, margin of safety rate and soles for tarRetnet income All Frute Company bottles and distribuses Frute Ade, a fruit drink. The beverage is sald for 50 cents per 16-ounce bottle to retailers who charge customers 70 cents per bottle. For...

  • Comprehensive Problem 5 Part B: Note: This section is a continuation from Part A of the...

    Comprehensive Problem 5 Part B: Note: This section is a continuation from Part A of the comprehensive problem. Be sure you have completed Part A before attempting Part B. You may have to refer back to data presented in Part A and use answers from Part A when completing this section. Genuine Spice Inc. began operations on January 1 of the current year. The company produces eight- ounce bottles of hand and body lotion called Eternal Beauty. The lotion is...

  • Use both pseudocode and flowcharts to solve the problems below: 1. Write a program that converts...

    Use both pseudocode and flowcharts to solve the problems below: 1. Write a program that converts a user-entered Fahrenheit temperature to equivalent Celsius temperature. Use the formula c = (5 / 9) * (f - 32) where c is representing a Celsius temperature and f a Fahreinheit temperature. 2. A program is required that will read two operands and print the product to a file. 3. A program will ask the user to enter his/her name. Upon entering the name...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT