heilo! recursion on sum(int a[], int n)

This is a discussion on heilo! recursion on sum(int a[], int n) within the C++ Programming forums, part of the General Programming Boards category; greetings! anyone could help me here! the problem is adding all the data in an array given the said parameter! ...

  1. #1
    Registered User
    Join Date
    Feb 2005
    Location
    city of waterfalls
    Posts
    3

    Unhappy heilo! recursion on sum(int a[], int n)

    greetings!
    anyone could help me here!
    the problem is adding all the data in an array given the said parameter! keep me posted then!

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,338
    Recursion is just a needless complication (ie student exercise).

    Try showing us that you can do it using a normal loop first.
    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.

  3. #3
    Registered User
    Join Date
    Mar 2002
    Posts
    1,595
    Here's a link to the FAQs entry regarding an introduction to recursion. If you MUST use recursion to complete your task, then this presentation should help you get started. Once you have attempted a solution please come back with a specific question including pertinent code, error message relating to a specific line, etc.


    http://faq.cprogramming.com/cgi-bin/...&id=1073086407
    You're only born perfect.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Working with random like dice
    By SebastionV3 in forum C++ Programming
    Replies: 10
    Last Post: 05-26-2006, 09:16 PM
  2. Game Won't Compile
    By jothesmo in forum C++ Programming
    Replies: 2
    Last Post: 04-01-2006, 03:24 PM
  3. Replies: 2
    Last Post: 03-24-2006, 07:36 PM
  4. Switch/case Problems (long code in post)
    By Wraithan in forum C++ Programming
    Replies: 2
    Last Post: 12-01-2005, 05:40 PM
  5. My graphics library
    By stupid_mutt in forum C Programming
    Replies: 3
    Last Post: 11-26-2001, 05:05 PM

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