Show 80 post(s) from this thread on one page
Page 1 of 3 123 Last
• 01-04-2007
blacksnake
good day to you....

I've been searching this code which computes the product of two numbers using addition...this problem is so confusing...what code did you used in this program?

I hope it will reply very soon...thanks
• 01-04-2007
Bench82
Think about it for a minute.. How do you multiply numbers together on paper?

What's 4 multiplied by 5...?

well, its 4 + 4 + 4 + 4 + 4
.. the number 4 added together 5 times

or, 5 + 5 + 5 + 5
the number 5 added together 4 times

If you want to perform an operation a certain number of times, then use a loop... Read here for more information
http://www.cprogramming.com/tutorial/lesson3.html
• 01-04-2007
blacksnake
what type of loop do you used in this program?
• 01-04-2007
Salem
for
while
do

Think about it for 5 minutes - OK ?
• 01-04-2007
blacksnake
in this case, what code (in a for loop pattern) satisfies the problem?
• 01-04-2007
Daved
What are your ideas on that question?
• 01-04-2007
blacksnake
it's about the program which input two numbers and get the product of it using adition
• 01-04-2007
Daved
I mean, what are your ideas on what code (in a for loop pattern) satisfies the problem?
• 01-04-2007
blacksnake
ya...
• 01-04-2007
blacksnake
for example:

Think about it for a minute.. How do you multiply numbers together on paper?

What's 4 multiplied by 5...?

well, its 4 + 4 + 4 + 4 + 4
.. the number 4 added together 5 times

or, 5 + 5 + 5 + 5
the number 5 added together 4 times
• 01-04-2007
Daved
Is that your answer to my question? I want to know what you think, not a copy and paste of what somebody else said.

The point is that you make some effort to solve the problem, and we help you figure out where your thinking is wrong or can be improved. If you have a question for us, then I'm asking you to give your thoughts on that question first, so they can be responded to.
• 01-04-2007
blacksnake
what code satifisfies this problem?
• 01-04-2007
Decrypt
What Salem and Daved are getting at is that no one here is going to spoon feed you this code. Please try to work this out on your own, then post the code and what problems you are having. If you do not understand the for loop, look at the tutorial again, read it carefully, and post what questions you have concerning the for loop structure. Once you understand the for loop structure, try to apply it to what Bench82 said. Post your efforts to the board and we'll help you solve specific problems with what you're doing.

 beaten, took too long making it polite...[/edit]
• 01-04-2007
blacksnake
ok
my code is found in my flash disk... do you want to show it?
• 01-04-2007
Decrypt
Yes, we'd like to see what you have accomplished so far.
Show 80 post(s) from this thread on one page
Page 1 of 3 123 Last