0

So I am trying to write a program that will give creditcard balance information and it is aparent when I compile that there is some sort of error ( error c2784 ). I think that I might not be including something that I need but I am not sure what it is. Everything else seems to be fine but I cant figure this out for the life of me. Any ideas?

Thanks

# include <iostream> 
# include <fstream> 
# include <cstdlib>
# include <string>
# include <cmath>

using namespace std;
 
int main () 
{

	
	double balance, interest, minpayment;
	
	int month(0);

	cout << " Enter your account balance: " << endl;
	cin >> balance;
			

	do
	{

			if (balance <= 1000)
			{
				interest = balance * .015;
				balance = balance * 1.015;
			}	
			else
			{
			
				interest = balance * .01;
				balance = balance * 1.01;

			}
	
	
			if (balance <= 10)
			{
				minpayment = balance;

			}

			else if (balance * .1 < 10)
			{
				minpayment = 10;

			}

			else
			{
				minpayment = balance * .1;
			}



			month = month++;
		



		
		cout << " Month " << month << endl;
		cout << " Interest is: " << interest << endl;
		cout << " Account balance is: " << balance << endl;
		cout << " Minimum payment is: " << minpayment << endl;
	
		

		cout >> " Would you like to see the next months figures?  Y/y or N/n " << endl;
		char yesorno;
		cin << yesorno;

	}		

		while (yesorno == y);

	
	


	

	
	return(0);

}
2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by Ponomous
1

there is a lot of logic errors, but this one is a compile time error :

cin << yesorno;

you mean cin >> yesorno , right.

0

haha woopse definitely flip flopped those by accident, thanks

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.