Thread: A new Challenge for u programmers out there:-

  1. #1
    Registered User
    Join Date
    Sep 2014
    Posts
    1

    Post A new Challenge for u programmers out there:-

    You are given a sequence of integers as input, terminated by a -1. (That is, the input integers may be positive, negative or 0. A -1 in the input signals the end of the input.)

    -1 is not considered as part of the input.

    Find the second largest number in the input. You may not use arrays.

  2. #2
    TEIAM - problem solved
    Join Date
    Apr 2012
    Location
    Melbourne Australia
    Posts
    1,907
    Finding the Second Largest Element |CodeGrudge
    Super Codings: Finding the Second Largest Element

    I think that you'll find that people will not do any challenges, because it usually violates the homework policy.
    Fact - Beethoven wrote his first symphony in C

  3. #3
    Registered User
    Join Date
    Jun 2005
    Posts
    6,815
    What have you tried?

    A challenge?? Pull the other leg: this is an obvious homework exercise, and a simple one at that. This site has a homework policy (follow this link) that - essentially - requires you to do your own homework before expecting help.
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. AI Challenge
    By unknown_111 in forum General AI Programming
    Replies: 0
    Last Post: 10-02-2007, 12:18 AM
  2. Take it as a challenge rather
    By shoeb_hi in forum C Programming
    Replies: 1
    Last Post: 01-14-2006, 03:40 PM
  3. Need a challenge
    By grohyt in forum C++ Programming
    Replies: 10
    Last Post: 10-25-2005, 04:50 PM
  4. Challenge
    By Ikurik in forum Game Programming
    Replies: 1
    Last Post: 08-22-2003, 10:30 PM
  5. Challenge just for fun
    By Bob123 in forum C Programming
    Replies: 2
    Last Post: 03-18-2002, 12:07 PM

Tags for this Thread