Can Someone Help me with this program.. dont kno what the error is :S:S

This is a discussion on Can Someone Help me with this program.. dont kno what the error is :S:S within the C Programming forums, part of the General Programming Boards category; i cant understand what is wrong with it. When i input the numbers to b calculated .. it doesnt output ...

  1. #1
    Registered User
    Join Date
    Feb 2009
    Posts
    3

    Exclamation Can Someone Help me with this program.. dont kno what the error is :S:S

    i cant understand what is wrong with it. When i input the numbers to b calculated .. it doesnt output it in the display function..

    can sum1 plz help me
    Attached Files Attached Files

  2. #2
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Did you write this?
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  3. #3
    Registered User
    Join Date
    Feb 2009
    Posts
    3
    yea i wrote it

  4. #4
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    It looks like a long program with a simple problem. Why don't you isolate the input and output functions you refer to and write a much shorter program to test them?
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  5. #5
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,548
    Seems like an ideal time to get familiar with the debugger then.

    Such things as
    - add breakpoints to stop the code at suspect places (or known good places just before)
    - examine variables, or maybe even watch them
    - step into / step over code to progress the program flow in a very controlled manner.

    When results != expectation, you've found a bug.

    Rinse and repeat as necessary.
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  6. #6
    Registered User
    Join Date
    Feb 2009
    Posts
    3
    i'm kinda new to this.. this is something i have to do for lessons dats y it is soo long

  7. #7
    Registered User
    Join Date
    Feb 2009
    Posts
    7
    I can't help you,
    but want to thank you.
    I am learning from you program

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Issue with program that's calling a function and has a loop
    By tigerfansince84 in forum C++ Programming
    Replies: 9
    Last Post: 11-12-2008, 12:38 PM
  2. Need help with a program, theres something in it for you
    By engstudent363 in forum C Programming
    Replies: 1
    Last Post: 02-29-2008, 12:41 PM
  3. Replies: 4
    Last Post: 02-21-2008, 09:39 AM
  4. My program, anyhelp
    By @licomb in forum C Programming
    Replies: 14
    Last Post: 08-14-2001, 10:04 PM

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21