CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2015
    Posts
    1

    Programming help

    I need help with a couple of programming assignments. If anyone is willing to help me can you please reply below. It's about 4 questions, I started them but i'm having some problems along the way.
    I'd be grateful for any help I can get

    Design a program that allows the user to enter two integer values, and displays every odd number that falls between these values. Assume that the second number is greater than the first number.
    Last edited by VictorN; November 22nd, 2015 at 11:24 AM. Reason: Posts were merged

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,398

    Re: Programming help

    There would be not a problem to help you if you explained what exactly problem you have: coding, understanding the algorithm, and so on...
    Victor Nijegorodov

  3. #3
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    7,825

    Re: Programming help

    What programming language are you using and what problems are you having with the program?

    An odd number is one when divided by 2 has a remainder.
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++23 Compiler: Microsoft VS2022 (17.6.5)

  4. #4
    Join Date
    Jun 2015
    Posts
    208

    Re: Programming help

    Quote Originally Posted by 2kaud View Post
    An odd number is one when divided by 2 has a remainder.
    And once the first odd number in the sequence has been found the second odd number can be found by adding 2 to the first one, and so on.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured