Greetings everyone.
I have two questions for anyone willing to try them (they're not very difficult). They are programming questions. Basically, you need to fill out these functions. I'll provide comments on what they should accomplish, though they should be self explanatory.
/* First question */
// This function takes in a number and multiplies it by 7...pretty simple.
// However, you can not use the "*" (multiply) operator. Try to make it as concise
// as possible.
int mult7(int num)
{
}
/* Second question */
// This function takes in a numerator and a denominator and must perform
// division. This one was a little convoluted for me the first time trying to
// crack it, but it made sense in the end. Oh yeah... you can use the "/" (divide)
// and the "*" (multiply) operators. One more thing, this is integer division, so don't
// worry about integer truncation. Ex. 7/2 = 3 not 3.5.
int divide(int num, int den)
{
}
All right, this is suppose to be fun, so have at it, y'all.
Edit:
Topic was just called "Divide Function"...had to include the multiplication one.
~Zorb Burger