I want to calculate the formula in C++ program. Put all 5 formula inside the program but just run 1 formula only.
For example, run the current ratio formula only. If you want another formula then just adjust the coding. Then the second formula will run. Just adjust inside only.
Its not a complete program just an outline. So, how to complete the program?
Formulas.h
#ifndef HEADER_H
#define HEADER_H
//These functions would probably be in your header file
Current_ratio()
Gross_margin()
Operating_margin()
Profit_margin()
ROE()
#endif
Formulas.cpp
//Declaration of your functions
Current_ratio()
{return (current asset / current liabilities);}
Gross_margin()
{return ((Revenue – Cost of goods sold) / Revenue);}
Operating_margin()
{return (Operating Income / Revenue);}
Profit_margin()
{return (Net Profit / Revenue);}
ROE()
{return (Net Income/Shareholder's Equity);}
Main.cpp
#include Formulas.h
main()
{
Current_ratio() //This is where you would call your one function(formula)
}