How to 1 more formula in the program? Inside the program got 1 formula, so I want add 1 more formula. If add 1 more, it be 2 formula in the program. I want to run the program but run 1 formula only.
#include <iostream>
#include "functions.h"
int main ()
{
finance_state MyState( 500.0 , 300.0 );
std::cout<< "my current ration is :\t"<< MyState.CurrentRatio()<<std::endl;
return 0;
}
Well you can include COGS and Revenue in your member variables and initialize them while constructing the object ( like your current_asset and current_liabilities ).
Then have another member function called GetGrossMargin as follows:
#include <iostream>
#include "functions.h"
int main ()
{
finance_state MyState( 500.0 , 300.0 );
std::cout<< "my current ration is :\t"<< MyState.CurrentRatio()<<std::endl;
return 0;
}
#include <iostream>
#include "functions.h"
int main ()
{
finance_state MyState( 500.0 , 300.0, 200.0, 100.0 );
std::cout<< "my current ration is :\t"<< MyState.CurrentRatio()<<std::endl;
std::cout<< "my Gross Margin is :\t"<< MyState.GetGrossMargin()<<std::endl;
return 0;
}