
- C++ Basics
- C++ Home
- C++ Overview
- C++ Environment Setup
- C++ Basic Syntax
- C++ Comments
- C++ Data Types
- C++ Variable Types
- C++ Variable Scope
- C++ Constants/Literals
- C++ Modifier Types
- C++ Storage Classes
- C++ Operators
- C++ Loop Types
- C++ Decision Making
- C++ Functions
- C++ Numbers
- C++ Arrays
- C++ Strings
- C++ Pointers
- C++ References
- C++ Date & Time
- C++ Basic Input/Output
- C++ Data Structures
- C++ Object Oriented
- C++ Classes & Objects
- C++ Inheritance
- C++ Overloading
- C++ Polymorphism
- C++ Abstraction
- C++ Encapsulation
- C++ Interfaces
Program to find the Break Even Point in C++
In this problem, we are given the three variables that denote total monthly expenditure (E), selling price (S) of the product, overhead maintenance (M) on each product. Our task is to create a program to find the Break Even Point in C++.
Break-Even Point is the total number of products that are required to be sold so that there should not be any loss or profit for the seller.
Problem Description − We need to find the total no. of products to be sold to make sure there is no loss.
Let’s take an example to understand the problem,
Input
E = 2400, S = 150, M = 30
Output
20
Explanation
Profit on each product is S - M = 150 - 30 = 120
Total number of products to be sold,
N = E/(S-M) = 2400 / 120 = 20.
Solution Approach
To make sure that there is no loss. The seller needs to sell to n products such that the profit on each product is equal to the total expenditure.
So, the number of product sold = Expenditure / (selling price - maintenance overhead)
Program to illustrate the working of our solution,
Example
#include <iostream> #include <math.h> using namespace std; int main() { int E = 2400, S = 150, M = 30; cout<<"No. of products to be sold is "<< ceil(E/ (S - M)); return 0; }
Output
No. of products to be sold is 20
- Related Articles
- Swift Program to find the EVEN numbers from the array
- Program to find Nth Even Fibonacci Number in C++
- Python program to find the Decreasing point in a List
- 8085 program to find the sum of series of even numbers
- Program to find the mid-point of a line in C++
- Program to find the highest altitude of a point in Python
- How to indicate a potential word break point within a section in HTML?
- Program to find only even indexed elements from list in Python
- Swift Program to Find the Mid-point of a Line
- C++ Program to find out the moves to read a point from another point in a 2D plane
- Program to find value of find(x, y) is even or odd in Python
- Program to find GCD of floating point numbers in C++
- 8086 program to find sum of Even numbers in a given series
- To find sum of even factors of a number in C++ Program?
- Program to find length of longest path with even sum in Python
