Why am I getting all of these errors in the body of main?

I'm attempting to write a loan program.All of my errors are coming before the void functions.Can someone tell me what's going on here?

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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#include <fstream>
#include <iostream>
#include <iomanip>
using namespace std;

void getinput ();
void autoloan ();
void mortgage ();
void printreport ();

	int main ()
	{
	double income;
	double totaldebt;
	double loanamount;
	bool eligible;
	int loantype;
	
	

	while (loantype!=3);
	{
	getinput (loantype ,income, totaldebt,loanamount);
		if (loantype==1)
		{
			autoloan(income, totaldebt, loanamount, eligible);
			printreport (loantype, loanamount, eligible);
		}

		else if (loantype==2)
		{
			mortgage (income, totaldebt, loanamount, eligible);
			printreport (loantype, loanamount, eligible);
		}
	}


void getinput (int&loantype, float & income, float & totaldebt, float & loanamount);
{
	cout<<"Select one of the following options: "<<endl<<endl;
	cout<<" 1 Auto Loan"<<endl;
	cout<<" 2 Mortgage "<<endl;
	cout<<" 3 Stop program"<<endl<<endl;
	cout<<" Enter a number ";
	cin>>loantype;
	if (loantype==1||loantype==2)
	{
		cout<<"Enter income, total debt, and loan amount"<<endl;
		cin>>income>>totaldebt>>loanamount;
	}
}

void autoloan (double income, double totaldebt, double loanamount, bool& eligible);
{
	if(income-totaldebt>=loanamount*.5)
		eligible=true;
	else (eligible=false);

}
void mortgage (double income, double totaldebt, double loanamount, bool& eligible);
{
	if(income-totaldebt>=loanamount*.3)
		eligible=true;
	else (eligible=false);

}

void printreport (int loantype, double loanamount, bool& eligible);
{
cout<<"Aprroved for loan?"<<eligible<<endl;
cout<<"Type of loan approved for   "<<loantype<<endl;
cout<<"In the amount of  "<<loanamount<<endl;
}

	

	}




What errors did you get?
You are missing all your parameters up in your prototypes. Like this:
void getinput (int&loantype, float & income, float & totaldebt, float & loanamount);

That's how each prototype up top should look.
You need to structure prototype declarations properly as vanllabean81 mentioned. There are still logical errors in code below you may want to look into it. I did fix few errors in your code below.

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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#include <fstream>
#include <iostream>
#include <iomanip>
using namespace std;

void getinput (int&, float & , float & , float & );
void autoloan (double , double , double , bool&);
void mortgage (double , double , double loanamount, bool& );
void printreport (int , double, bool& );

	

void getinput (int&loantype, float & income, float & totaldebt, float & loanamount)
{
	cout<<"Select one of the following options: "<<endl<<endl;
	cout<<" 1 Auto Loan"<<endl;
	cout<<" 2 Mortgage "<<endl;
	cout<<" 3 Stop program"<<endl<<endl;
	cout<<" Enter a number ";
	cin>>loantype;
	if (loantype==1||loantype==2)
	{
		cout<<"Enter income, total debt, and loan amount"<<endl;
		cin>>income>>totaldebt>>loanamount;
	}
}

void autoloan (double income, double totaldebt, double loanamount, bool& eligible)
{
	if(income-totaldebt>=loanamount*.5)
		eligible=true;
	else (eligible=false);

}
void mortgage (double income, double totaldebt, double loanamount, bool& eligible)
{
	if(income-totaldebt>=loanamount*.3)
		eligible=true;
	else (eligible=false);

}

void printreport (int loantype, double loanamount, bool& eligible)
{
cout<<"Aprroved for loan?"<<eligible<<endl;
cout<<"Type of loan approved for   "<<loantype<<endl;
cout<<"In the amount of  "<<loanamount<<endl;
}

	int main ()
	{
	double income;
	double totaldebt;
	double loanamount;
	bool eligible;
	int loantype;
	
	//Do intializations

	while (loantype!=3);
	{
	    getinput (loantype ,income, totaldebt,loanamount);
		if (loantype==1)
		{
			autoloan(income, totaldebt, loanamount, eligible);
			printreport (loantype, loanamount, eligible);
		}

		else if (loantype==2)
		{
			mortgage (income, totaldebt, loanamount, eligible);
			printreport (loantype, loanamount, eligible);
		}
	}


	}
Got it worked out. Thanks for the help, guys.
Topic archived. No new replies allowed.