pls help

Discussion in 'C++' started by weirdo_xto, Jun 20, 2007.

  1. weirdo_xto

    weirdo_xto New Member

    Joined:
    Mar 9, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    can you make a program in C that inputs 10 numbers and output if it is odd or even and the number from lowest to highest... pls ^^ :)
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Looks like its your assignment and its you who should be doing it. We can always help you in the process but just can't give you all the code you need to submit to your faculty
     
  3. weirdo_xto

    weirdo_xto New Member

    Joined:
    Mar 9, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    just a code for odd or even...pls
     
  4. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Code:
    if(number%2 == 0)
      printf("Number is Even");
    else
      printf("Number is Odd");
     
  5. cheap freelancer

    cheap freelancer New Member

    Joined:
    Jun 14, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    askexpert.info
    Home Page:
    http://myitcareer.org/
    Code:
    for(int i=0; i < 10;i++) {
    cout << "Enter a number" << endl;
    cin >> number;
    if(number%2 == 0)
      printf("Number is Even");
    else
      printf("Number is Odd");
    }
    
    
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice