Talk:C++ Programming/Exercises/Iterations

Input and output examples
It would be easier to understand the problems with examples of input and output. Something like:

EXERCISE 5

Write a program that asks the user to type 10 integers and writes the smallest value.

...

--Neko Spectrus (discuss • contribs) 22:31, 10 January 2015 (UTC)

c++
please define some symbols and words.

Is this part of a complete c++ tutorial? If so, may I have the address? Thanks, Johndur (discuss • contribs) 03:58, 4 July 2011 (UTC)


 * Reply is on your user talk page. --Panic (discuss • contribs) 09:32, 4 July 2011 (UTC)

Exercise 7
How can u(0)=3. Doesn't this essentially mean u * 0 = 3? And anything multiplied by zero always equals zero.


 * No, the intention is that u is a mathematic function that should result in 3 when input variable is 0. In your rational what would u mean ? --Panic (discuss • contribs) 21:43, 4 October 2011 (UTC)


 * Ahh I see, what I thought it meant was that u was a variable and u(0)=3 was shorthand for u multiplied by 0 = 3. Dopple (discuss • contribs) 18:26, 10 October 2011 (UTC)

good site brosephs, bachem, brahs and bros

I'm struggling with the math a bit here. How do you get u(n)=(3*f(a-1)+4)? Fir3tree) 15:49, 5 August 2014 (UTC)

in how many years the population of one country exceed another
5 * 1.03 ** n = 7 * 1.02 ** n where n is the number of years

log (5) + n * log (1.03) = log (7) + n * log (1.02) log everything. any base will do but here it is 10.

0.698970004 + n * 0.012837225 = 0.84509804 + n * 0.008600172 scientific calculator n * (0.012837225 - 0.008600172) = 0.84509804 - 0.698970004 not good to retype the answer from a calculator so restate the problem as

n = (log7 -log5)/(log1.03 - log1.02) copy and paste the above into your scientific calculator n = 34.488130697 years or 35 years. Thank you Lord Napier.