Stuck!?! I need a program that loops 20 times and sums only even integer index values

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chithead99
    New Member
    • Mar 2008
    • 1

    Stuck!?! I need a program that loops 20 times and sums only even integer index values

    It starts at 1 and must output the sum, It will equal 110
  • Ganon11
    Recognized Expert Specialist
    • Oct 2006
    • 3651

    #2
    What do you have so far? Do you know how to use loops? How to decide if a number is odd or even? How to use a variable and arithmetic?

    Comment

    • pralu
      New Member
      • Mar 2008
      • 34

      #3
      Originally posted by chithead99
      It starts at 1 and must output the sum, It will equal 110

      can u plz tell me that the values u gonna enter is in array or not......
      and if its array then it must b very simple to do

      Comment

      • pralu
        New Member
        • Mar 2008
        • 34

        #4
        [CODE]
        may be this code helps u ....

        <Code removed by Admin>
        Last edited by r035198x; Mar 28 '08, 06:48 AM. Reason: spoon feeding is against site rules. Don't do it again

        Comment

        Working...