Question: 4. C programming a. Write a subroutine to calculate the remainder of division. Input will be two integers and output will be the remainder


4. C programming a. Write a subroutine to calculate the remainder of

4. C programming a. Write a subroutine to calculate the remainder of division. Input will be two integers and output will be the remainder of the first input divided by the second input. (3 marks) b. Write a main function to call this subroutine. Input two integers, i.e. 100 and 7, to the subroutine. If the remainder is greater than 4, return 1. Otherwise return 0. The subroutine needs to be placed in a library file. Show what's in the header file and explain how to include the header in the main file. c. Sketch flow charts of the subroutine and the main function. (5 marks) (4 marks)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

a Heres an example of a subroutine in C that calculates the remainder of division int calculateRemai... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!