I submitted an assignment but I was told it was wrong. I have till the end of the day to get it right but I'm working and my deadline is creeping up. So I'm hoping you guy can help me out.
Assignment
Write a program with two funtions: main and remainder. The remainder function will work exactly the same as the % operator in C++, that is:
cout << remainder(10, 3) ;
will print 1, the same as the result of 10%3.
The limitation is that you cannot use the % operator to implement fucntion remainder You will have to write the code from the scratch so that your function remainder produces the same results as %.
Your function main should just ask the user to input two numbers, and then it will call remainder to calculate and print the result of the remainder of the first number divided by the second.