program not recognizing function.

Hey I'm gunna feel like an idiot here but this is riving me nuts. I'm writing a small loan program for class that takes in information and then spits it back out. it also reads your credit score and if it is under a certain number it denies you the loan. For some reason the program keeps skipping the function where the user enters info and just does the credit score check. Help would be amazing! thanks!

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
#include <iostream>
using namespace std;

void enter_info(int);
void judge_custumer(int);

int main()
{
   
     int cscore;
   
     cout << "Please enter your credit score: ";
     cin >> cscore;
     
     int enter_info(cscore); 
     judge_custumer(cscore);
    
     return 0;
    
}

//Function Defining

void enter_info(int cscore)
{
     string name;
     string address;
     string social;
     string loan;
     
     cout << "Please enter your name: ";
     getline(cin, name);
     cout << "Please enter your address: ";
     getline(cin, address);
     cout << "Please enter your social security number: ";
     getline(cin, social);
     cout << "Please enter the desired loan ammout: ";
     getline(cin, loan);
     
     cout << "Name: " << name << "\n";
     cout << "Address: " << address << "\n";
     cout << "Social Security: " << social << "\n";
     cout << "Credit Score: " << cscore << "\n";
     cout << "Desired Loan: " << loan << "\n";
     

     
     }
     
void judge_custumer(int cscore)
{
     
     
     
     if (cscore < 600)
        cout << "We're sorry. Your loan has been denied based on your credit.";
     else
        cout << "Thank you for using this bank. Your loan has been approved.";
        

     
     }

Last edited on
int enter_info(cscore);

take the int out , it should work properly
Last edited on
Topic archived. No new replies allowed.