Thread: C program Help

  1. #1
    Registered User
    Join Date
    Jun 2017
    Posts
    2

    Post C program Help

    Please me to check my program and tell me the solution.

    Question

    Attachment 15214Attachment 15215Attachment 15216Attachment 15217
    Attached Images Attached Images C program Help-dsc_0128-jpg C program Help-capture1-jpg 
    Last edited by IAmLastPrime; 10-02-2017 at 03:59 AM.

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    So, it looks like your program compiled without even a warning. That's good. Have you tested it? How does it not work? I would have tried entering the sample input at the very least, but from what I see you should have discovered something wrong just from doing that.
    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

  3. #3
    Registered User
    Join Date
    Jun 2017
    Posts
    2
    When I type the input, the output is different with my question output.
    Quote Originally Posted by laserlight View Post
    So, it looks like your program compiled without even a warning. That's good. Have you tested it? How does it not work? I would have tried entering the sample input at the very least, but from what I see you should have discovered something wrong just from doing that.

  4. #4
    Registered User
    Join Date
    Jun 2011
    Posts
    4,513
    Post your code here, using code tags. Tell us the input you're entering, the output you're getting, and the output you're expecting.

    Also, you might want to look into the "no target in no no project" message seen in your screen shot.

  5. #5
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,662
    You're not helping matters by editing your post with different attachments after people have replied.

    Also your assignment attachment refers to lab3p1.c, where your IDE shows lab3p3.c.
    And that little *lab3p3.c next to the filename means you've edited the file since you last compiled it.

    Who knows what your problem is, or what your attempt is.

    Sloppy work.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 5
    Last Post: 03-15-2016, 03:29 PM
  2. Replies: 4
    Last Post: 12-21-2015, 07:17 AM
  3. Replies: 2
    Last Post: 09-09-2014, 02:36 PM
  4. Replies: 1
    Last Post: 03-03-2009, 04:47 PM
  5. Replies: 5
    Last Post: 08-16-2007, 11:43 PM

Tags for this Thread