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,


E = 2400, S = 150, M = 30




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,


 Live Demo

#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;


No. of products to be sold is 20

Updated on: 16-Sep-2020


Kickstart Your Career

Get certified by completing the course

Get Started