Thread: Sorting a set of numbers based on what the user inputs?

  1. #31
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Quote Originally Posted by phantomotap
    He (Laserlight) has also called me "childish j..........**s" and "chillingly blunt".
    I think you have confused me with someone else, since I do not use the former term (i.e., I make every attempt to avoid the use of words that may require censorship). I certainly have called you blunt, perhaps terribly blunt, but "chillingly blunt" does not quite sound like the term that I would use.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  2. #32
    Registered User
    Join Date
    Oct 2008
    Posts
    1,262
    Quote Originally Posted by Adak View Post
    I am advocating NOT tutoring. I favor exploring C, having fun with C, discovering how to make C work for you, etc.

    << WE ARE NOT TUTORS >>


    Generally, rather helpful -- yes. Tutors, NO!
    So our job is to do things that work against the tutors? That's pretty much what you were supporting in Msh's post. I mean, Msh worked against the OP's tutor by changing an exercise in an example. You claimed that this was not wrong as we learn by examples. Hence, you were saying the original tutors did a bad thing, or a useless thing, by stating an exercise rather than giving a bunch of code.

  3. #33
    Registered User
    Join Date
    Oct 2008
    Posts
    1,262
    Quote Originally Posted by EVOEx View Post
    Actually, I've never thought any of those things about you. But I have to say, laserlight is wrong a hell of a lot of the time.

    (As if we weren't enough off topic yet)
    DAMN IT! I meant to write "right" there.

    Let me fix it: "Actually, I've never thought any of those things about you. But I have to say, laserlight is right a hell of a lot of the time."
    I have no idea what made me type "wrong" there. Maybe I was thinking of Adak :P.

    The entire joke is wasted there, though. Yes, the post was intended to be somewhat funny.

    FAIL

  4. #34
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    We are NOT tutors, and we are not working AGAINST tutors, either.

    We are exploring C, discussing C, discovering C, and having a bit of fun with it.

    A tutor has a different role, and a different relationship with the student.

    Your idea of what I was saying is twisted beyond all recognition from reality, of course.

  5. #35
    Novice
    Join Date
    Jul 2009
    Posts
    568
    This is not going anywhere good that I can see -- can we just drop the topic?

    I see that this community has strong feelings about its traditions, and I apologize for my ignorance of those. In future, I will do my best to keep within the guidelines defined by these traditions and, in true spirit of C, provide pointers-to solutions rather then solutions.

  6. #36
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Quote Originally Posted by msh
    In future, I will do my best to keep within the guidelines defined by these traditions and, in true spirit of C, provide pointers-to solutions rather then solutions.
    That would be good. Personally, I feel that what you did was okay: vmckoon2 made an effort, and you judged it sufficient for you to post a better version. It may have been better to post more hints first, but how much effort should be required from the help seeker before a concrete example may be ventured is rather subjective.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  7. #37
    Registered User claudiu's Avatar
    Join Date
    Feb 2010
    Location
    London, United Kingdom
    Posts
    2,094
    Quote Originally Posted by msh View Post
    This is not going anywhere good that I can see -- can we just drop the topic?

    I see that this community has strong feelings about its traditions, and I apologize for my ignorance of those. In future, I will do my best to keep within the guidelines defined by these traditions and, in true spirit of C, provide pointers-to solutions rather then solutions.
    Make sure those pointers point to a valid solution

    Just kidding.
    1. Get rid of gets(). Never ever ever use it again. Replace it with fgets() and use that instead.
    2. Get rid of void main and replace it with int main(void) and return 0 at the end of the function.
    3. Get rid of conio.h and other antiquated DOS crap headers.
    4. Don't cast the return value of malloc, even if you always always always make sure that stdlib.h is included.

  8. #38
    Registered User
    Join Date
    Jul 2010
    Posts
    3
    write a function which accepts numbers until 0 is entered or 10 numbers have been accepted the function prints total number of positive entries & sum of all the positive numbers plzzzzzzz... som1 giva solution 2dis....
    Last edited by apoorva; 07-02-2010 at 06:36 AM.

  9. #39
    Registered User
    Join Date
    Jul 2010
    Posts
    3
    plzz help me on wth dis assignment

  10. #40
    Registered User
    Join Date
    Jul 2010
    Posts
    3
    modify the function to accept characters endlessly until the character ! is input keyboard

  11. #41
    Registered User claudiu's Avatar
    Join Date
    Feb 2010
    Location
    London, United Kingdom
    Posts
    2,094
    dis is not a homework forum, we haz all done our homeworkz when in zchool! u do the zame.
    1. Get rid of gets(). Never ever ever use it again. Replace it with fgets() and use that instead.
    2. Get rid of void main and replace it with int main(void) and return 0 at the end of the function.
    3. Get rid of conio.h and other antiquated DOS crap headers.
    4. Don't cast the return value of malloc, even if you always always always make sure that stdlib.h is included.

  12. #42
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    Apoorva, you're almost guaranteed NOT to get the program you want, here. "Plz give me da codz", doesn't work here, 99% of the time.

    Post up your attempt (yes code), and describe your problem with your program, and we'll help.

    Always start a new thread, instead of reviving a "Zombie" thread. They pretty much get ignored, or worse - attacked. Alas, nobody likes Zombies!

  13. #43
    Novice
    Join Date
    Jul 2009
    Posts
    568
    Quote Originally Posted by Adak View Post
    They pretty much get ignored, or worse - attacked. Alas, nobody likes Zombies!
    12gauge or a flamethrower?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Sorting numbers in descending order
    By Yunasnk in forum C++ Programming
    Replies: 2
    Last Post: 11-23-2003, 05:55 PM
  2. Sorting Random Numbers
    By kid kash in forum C++ Programming
    Replies: 4
    Last Post: 12-07-2002, 04:47 AM
  3. Contest Results - May 27, 2002
    By ygfperson in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 06-18-2002, 01:27 PM
  4. Replies: 6
    Last Post: 04-12-2002, 08:33 AM
  5. Action Based On User Input
    By Stealth in forum C++ Programming
    Replies: 2
    Last Post: 10-03-2001, 05:38 AM