Lol, tkank you for this lessons ;-) It reassures me that everyone can not do it the first time ! (it's not juste me...)
It's something that you have to learn, some people just pick up certain things faster/easier than others. Like with pretty much everything in life...
I followed your advice to printf, which allowed me to compile (the problem for compilation).
Well, that's strange, as I copy&pasted your code without any modification and it compiled just fine for me...
Now the program compiled, but I can not make it display the sum.
Well, the program does exactly what you tell it to do. Though that might not be what you intended...
I will follow your advice and those of Ralf (problem of reasoning etc.) and see if I can.
Seriously, sit down with a piece of paper and a pen and do one example step by step on paper, making a column on the left for the instruction, and several columns for the various variables you use on the right. I think you will find your issue pretty quickly this way, and the overall program is small enough to do this easily...
@ Ralf: I do not want anyone to make the excercie for me. I complete my marketing school, by computer. The hardest for me is to learn the reasoning (close to mathematics and very different from marketing). I have no pressure to succeed
Well, we can't "see" what a persons intentions are and this is a typical home assignment program, hence my comments. And we have frequently people coming in here with similar questions that in fact are homework assignments...
But even in your cause (or even more so), it doesn't help you to get a finished solution, as you would likely not learn anything out of it, and that's after all the whole purpose of it, right?
Thank you for your help !!
You're welcome...
Ralf