Starting from:

$25

Assignment 3-Programming with words


a) A C++ program must have at least one function. What is its name? b) What is the preprocessor ? c) The function proposed in our programming exercise below requires two integer values as input (parameters) . The way we have been using (defining) main, how many values does it appear to require?
C++ Program 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.
9/15/14 12:32 PM
Page 2 of 2file:///Users/rafaelvicente/Dropbox/Materials/CplusplusOnline/Cpp%20Course%20FA%202014/Assignment%203.html
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.

More products