Question: Please use the given functions in the problem as well as c not c++ This project should run exactly as shown in Project3. However, your






Please use the given functions in the problem as well as c not c++
This project should run exactly as shown in Project3. However, your code must use functions instead of putting everything inside the main function. Your program must implement the functions whose prototypes are given below. Feel free to add more functions whenever you see fit void getId( int pId This function asks the user to enter the student's id that is stored in *pId int checkNumberofCourses (int numCourses ) This function returns 0 if numCourses is not a valid number of courses (recall a student takes 0, or 2 courses) It returns 1 otherwise int checkCourseNumber int crn) This function returns 0 if the passed crn isn't from the list of allowable crns. It returns l otherwise int getCreditHours int crn ) This function uses a switch structure and returns the number of credit hours that go with the passed crn. For instance getCreditHours (4599) returns3 void printInvoiceLine int crn, int creditHours) This function, when called, prints something like: 4599 S 360.75 if crn is 4599 and creditHours is 3. This function should be called at most two times because a student takes up to two courses void printInvoice int id, int crnl, int crn2 This function prints the fee invoice. Note that this function may call printInvoiceLine Furthermore, make sure that your program doesn't have duplicate code; if you have duplicate code then you should use a function that you call twice or more to avoid duplication of code. At Valence community college, a student can take up to two courses. The purpose of this assignment is to construct a fee invoice for a student. This requires the input of Student's id as an integer and (up to) the two course numbers as integers. It costs 120.25 dollars per credit hour in addition to $35.00 charged for health and id services
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
