Jump to content




Recent Status Updates

View All Updates

Developed by TechBiz Xccelerator
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
  • 17,278 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
  • 17,278 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/





Powered by binpress