product using adition

This is a discussion on product using adition within the C++ Programming forums, part of the General Programming Boards category; good day to you.... I've been searching this code which computes the product of two numbers using addition...this problem is ...

  1. #1
    Notorious Turbo C killer blacksnake's Avatar
    Join Date
    Jan 2007
    Location
    philippines
    Posts
    50

    Question product using adition

    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

  2. #2
    Registered User
    Join Date
    Feb 2006
    Posts
    312
    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

  3. #3
    Notorious Turbo C killer blacksnake's Avatar
    Join Date
    Jan 2007
    Location
    philippines
    Posts
    50

    reply:

    what type of loop do you used in this program?

  4. #4
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,671
    for
    while
    do

    Think about it for 5 minutes - OK ?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  5. #5
    Notorious Turbo C killer blacksnake's Avatar
    Join Date
    Jan 2007
    Location
    philippines
    Posts
    50

    reply

    in this case, what code (in a for loop pattern) satisfies the problem?

  6. #6
    Registered User
    Join Date
    Jan 2005
    Posts
    7,340
    What are your ideas on that question?

  7. #7
    Notorious Turbo C killer blacksnake's Avatar
    Join Date
    Jan 2007
    Location
    philippines
    Posts
    50

    reply

    it's about the program which input two numbers and get the product of it using adition

  8. #8
    Registered User
    Join Date
    Jan 2005
    Posts
    7,340
    I mean, what are your ideas on what code (in a for loop pattern) satisfies the problem?

  9. #9
    Notorious Turbo C killer blacksnake's Avatar
    Join Date
    Jan 2007
    Location
    philippines
    Posts
    50

    reply

    ya...

  10. #10
    Notorious Turbo C killer blacksnake's Avatar
    Join Date
    Jan 2007
    Location
    philippines
    Posts
    50

    reply

    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

  11. #11
    Registered User
    Join Date
    Jan 2005
    Posts
    7,340
    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.

  12. #12
    Notorious Turbo C killer blacksnake's Avatar
    Join Date
    Jan 2007
    Location
    philippines
    Posts
    50

    reply

    what code satifisfies this problem?

  13. #13
    Moderately Rabid Decrypt's Avatar
    Join Date
    Feb 2005
    Location
    Milwaukee, WI, USA
    Posts
    300
    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.

    [edit] beaten, took too long making it polite...[/edit]
    There is a difference between tedious and difficult.

  14. #14
    Notorious Turbo C killer blacksnake's Avatar
    Join Date
    Jan 2007
    Location
    philippines
    Posts
    50

    ok

    my code is found in my flash disk... do you want to show it?

  15. #15
    Moderately Rabid Decrypt's Avatar
    Join Date
    Feb 2005
    Location
    Milwaukee, WI, USA
    Posts
    300
    Yes, we'd like to see what you have accomplished so far.
    There is a difference between tedious and difficult.

Page 1 of 3 123 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Matrix product
    By Cotizo in forum C++ Programming
    Replies: 4
    Last Post: 08-03-2008, 10:10 AM
  2. ...multiplication using stacks
    By iiwhitexb0iii in forum C Programming
    Replies: 1
    Last Post: 10-09-2006, 01:28 AM
  3. Product Keys
    By codegirl in forum Tech Board
    Replies: 6
    Last Post: 05-20-2006, 02:55 PM
  4. Microsoft Product Activiation loopholes
    By Liger86 in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 07-08-2005, 05:20 PM
  5. IE 6 status bar
    By DavidP in forum Tech Board
    Replies: 15
    Last Post: 10-23-2002, 05:31 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21