diff --git a/src/requestLoan.c b/src/requestLoan.c index b639585..dc396ec 100644 --- a/src/requestLoan.c +++ b/src/requestLoan.c @@ -1,27 +1,24 @@ #include "requestLoan.h" -int allow() + +int allow() //int allow() is helpful for indirectly testing void requestLoan() { if (a == 1) { return 1; } - else - { - return 0; - } } void requestLoan() { - if (allow() == 1) + if (allow() == 1) //only if int allow() returns 1, void requestLoan() will display the desired output { - printf(" Please select a loan Package: \n"); - printf(" \n"); - printf(" \n"); - printf(" 1000 Euro\n"); - printf(" 2500 Euro\n"); - printf(" 5000 Euro\n"); + printf(" Please select a loan Package: \n"); + printf(" \n"); + printf(" \n"); + printf(" %d %s\n", option1, currency); + printf(" %d %s\n", option2, currency); + printf(" %d %s\n", option3, currency); } } diff --git a/src/requestLoan.h b/src/requestLoan.h index de31f48..25c0001 100644 --- a/src/requestLoan.h +++ b/src/requestLoan.h @@ -3,8 +3,13 @@ #include #include + void requestLoan(); int allow(); -const int a = 1; +const int a = 1; //a is a constant used for indirectly testing void requestLoan() +char currency[] = "Euro"; +int option1 = 1000; +int option2 = 2500; +int option3 = 5000; #endif // REQUESTLOAN_H