Anda di halaman 1dari 3

Return on Investment-Performance Evaluation

Problem
The program that will compute for the return on investment of a division as a performance
evaluation of the division and the manager responsible.
Program
#include <iostream>
#include <math.h>
using namespace std;
void main()
{
int num3;
long int num1,num2,num5,num6,num7,num8;
double num4,num9;
char name[50];
cout<<"________________________________________________________________"<<endl;
cout<<endl;
cout<<"Computation of Return on Investment-Performance Evaluation"<<endl;
cout<<"________________________________________________________________"<<endl;
cout<<endl;
cout<<"Name of Division Manager: ";
cin.getline (name,50);
cout<<endl;
cout<<" Please fill up the required data: "<<endl;
cout<<endl;
cout<<"Total Assets: ";
cin>>num1;
cout<<"Total Current Liabilities: ";
cin>>num2;
cout<<"Sales in Units: ";
cin>>num3;
cout<<"Sales Price: ";
cin>>num4;
cout<<"Cost of Goods Sold: ";
cin>>num5;
cout<<endl;
cout<<"_______________________________________________________________"<<endl;
cout<<endl;
num6=num1-num2;
cout<<"Investment: "<<num6<<endl;
num7=num3*num4;
cout<<"Sales: "<<num7<<endl;
num8=num7-num5;
cout<<"Net Income: "<<num8<<endl;
cout<<endl;
cout<<"_______________________________________________________________"<<endl;
cout<<endl;
num9=num8*100/num6;
cout<<name<<", Your division's Return on Investment for the period is "<<num9<<"%"<<endl;
}

Output

Discussions
For creating a program and source file see Discussion of Activity 1 and for
introduction of the main program, introduction of variables and input of characters involving
personal information, see Discussion of Activity 4.
An additional information on introduction of variable which is long int which enable
the program to display millions. Thats why the Total Assets, Total Current Liabilities, Cost of
Goods Sold, Sales, Net Income and Investments are introduced as such.
After the information which is the Division Manager Name is entered, proceed to the
program which accepts the Total Assets, Total Current Liabilities, Sales in Units, Sales Price
and Cost of Goods Sold.
After requiring the numbers, the formula for Sales, Net Income and Investments will
be required to compute for Return of Investment(ROI).
For computation of Sales, Sales in Units is multiplied by Sales Price. For
Computation of Net Income, Cost of Goods Sold is subtracted from Sales. And for the
computation of Investment, Total Current Liabilities is subtracted from Total Assets. The
answer will be displayed after each formula together with the label (e.g. cout<<Net Income:
<<num8;)
The formal definition of ROI is a performance measure used to evaluate the
efficiency of an investment or to compare the efficiency of a number of different investments.
To calculate ROI, the Net Income is divided by the cost of the investment; the result is
expressed as a percentage or a decimal.
The final output is displayed according to your discretion like that entered in the
program.
For ending the main program, see Discussion of Activity 4.
Note that the design of the program depends on your choice. It may include spaces
and lines as separation.
Start the program(See Discussion of Activity 1).

Source: https://golightpath.com/what-is-return-on-investment

Anda mungkin juga menyukai