Giving me only part of the output

This program is just allowing me to enter the income and not the expenses. I need a program that allows you to enter the income and expense amounts, which will always be intergers. The number of income and expense amounts may vary each time the program is compiled.

Here is what I have so far:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include <iostream>
using namespace std;
int main()
{
	//Variables
	int incomes = 0;
	int expenses = 0;
	int totalIncome = 0;
	int totalExpenses = 0;
	int profit = 0;

	// bring loop
	while (incomes >= 0)
	{
		totalIncome += incomes;
		cout << "Enter an income value (negative value to stop): ";
		cin >> incomes;
		
	}

	while (expenses >+ 0)
	{
		totalExpenses += expenses;
		cout << "Enter an expense value (negative value to stop): ";
		cin >> expenses;
		
	}

	//calculate profit (or loss)
	profit = totalIncome - totalExpenses;
	//display totals and the profit
	cout << "Total income is $" << totalIncome << endl;
	cout << "Total expenses is $" << totalExpenses << endl;
	cout << "Profit is $" << profit << endl;
	

system("pause");
return 0;
}
//end of main function 
while (expenses >+ 0)

What is this? Does this even compile?
Topic archived. No new replies allowed.