// Solution Hint: the base10 logarithm of a number

// (available in a function named "log10") tells what

// exponent to raise 10 to to get that number.

// e.g. 10^2 = 100, so log10(100) = 2; log10(1000) = 3, etc.

// Numbers between 100 and 1000 would have logarithms

// between 2 and 3 (so if you drop the fraction, you get 2).

//

// BUT: log10 expects a real number of some kind

// (float or double) as an argument, so to successfully

// use it in Visual Studio, one must convert the value

// above to a real number first, and then convert the

// computed logarithm back to an integer for the desired result.

// You may use either static_cast<float>() or (float)

// to convert an integer to float; and similarly in the reverse.

//

// NOTE: A correct solution that handles all valid integers

// will still need an IF statement!

Homework so soon.

homework above your level obv

Yeah. Good thing my grade doesn't depend on it, huh?

Figured it out myself, was just looking for help. What a nice forum damn.

You weren't looking for help; you were looking for someone to do it for you (and went about it in a very rude manner). There's a difference. Learn it.

I didn't need a reply of homework so soon or else I wouldn't have been rude. There was no need for that reply.

I'm not buying it. You copy paste your homework, don't bother to remove the C++ comment marks, act like we're obligated to do it, then get upset when we call you out on it.

I said so soon because September is usually the start of the academic year. Out in the real world you would have to define the problem, design the solution, then test the boundaries of the solution.

My bad then but honestly was just looking for help sorry for coming across ignorant.

Ask Your Question

Weekly Poll

Would you ride in a self-driving car from Tesla?

Discuss in The Lounge

Poll History