Jump to content




Recent Status Updates

  • Photo
      18 Aug
    KodeKool

    When faced with a wall of errors and no hope to fix them, remember the following "Programs always do what you tell them to, and seldom what you want them to, but eventually you'll run out of things that can go wrong and it'll just work. and that's the secret to good programming."

    Show comments (2)
  • Photo
      11 Aug
    Error

    Should I be practicing programming every day? I feel if I don't, I'll get instantly rusty or something.

    Show comments (4)
View All Updates

Developed by Kemal Taskin
Photo
- - - - -

Simple program to add odd numbers


  • Please log in to reply
4 replies to this topic

#1 nahrain

nahrain

    CC Lurker

  • Just Joined
  • Pip
  • 5 posts

Posted 05 April 2009 - 05:08 PM

I need to write a simple program to add odd numbers. I need to get the user input for the upper bound. Can somebody please help me with the coding for this? I am new to Visual Basic, so an explanation in layman's terms would be very helpful. Thank you.
  • 0

#2 WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderator
  • 16,983 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others

Posted 06 April 2009 - 03:29 AM

Based on your first sentence, I would expect the user to input two odd numbers, and you add them. Your second sentence suggests that you are doing something else, like adding all odd numbers up to a certain value? Can you give an example of what is supposed to be done?
  • 0

Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

My MineCraft server site: http://banishedwings.enjin.com/


#3 nahrain

nahrain

    CC Lurker

  • Just Joined
  • Pip
  • 5 posts

Posted 06 April 2009 - 11:13 AM

WingedPanther,

Thank you for your responses, funny by the way! Ok, so, the user is supposed to enter a number in a textbox, and when they hit a button named "calculate", or whatever, the code is supposed to display, in a label, the Fibonacci Sequence up until that number ( I think that is the upper bound). So the coding will go in the button click event. Sorry if this seems to elementary for you, but I really am new.
  • 0

#4 Corky

Corky

    CC Regular

  • Just Joined
  • PipPipPip
  • 32 posts

Posted 06 April 2009 - 12:21 PM

? i think you meant to post this in your other topic ?
  • 0

#5 WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderator
  • 16,983 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others

Posted 06 April 2009 - 12:55 PM

I thought you wanted to add odd numbers... ?
  • 0

Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

My MineCraft server site: http://banishedwings.enjin.com/