Thread: Ceil function source help pls

  1. #1
    Registered User
    Join Date
    Dec 2006
    Posts
    34

    Unhappy Ceil function source help pls

    i need a simple program with ceil function....

    pls.. if u have some.. ehhehehhe

  2. #2
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,005
    Quote Originally Posted by Marrah_janine
    i need a simple program with ceil function....

    pls.. if u have some.. ehhehehhe
    This is not a chat room.
    http://www.google.com/search?q=ceil
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

  3. #3
    Registered User
    Join Date
    Dec 2006
    Posts
    34
    Quote Originally Posted by Dave_Sinkula
    This is not a chat room.
    http://www.google.com/search?q=ceil
    i know this isnt a chatroom. sorry.

    im just asking for a smple prog bcoz that will be our assignment for tomorrow.
    tnx by the way

  4. #4
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,005
    Quote Originally Posted by Marrah_janine
    im just asking for a smple prog bcoz that will be our assignment for tomorrow.
    Ah...
    http://cboard.cprogramming.com/annou...t.php?f=3&a=39
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

  5. #5
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    double ceil ( double x );

    Returns the smallest integer that is greater or equal to x
    Surely the code for that isn't hard to conceive?

    Hint: casting a double to an int will truncuate the value (remove decimal places), turning 1.23 into 1 and 3.9 into 4.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  6. #6
    Registered User
    Join Date
    Dec 2006
    Posts
    34
    Quote Originally Posted by dwks
    Surely the code for that isn't hard to conceive?

    Hint: casting a double to an int will truncuate the value (remove decimal places), turning 1.23 into 1 and 3.9 into 4.
    thanks......UUUU

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. In over my head
    By Shelnutt2 in forum C Programming
    Replies: 1
    Last Post: 07-08-2008, 06:54 PM
  2. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 05:45 PM
  3. Change this program so it uses function??
    By stormfront in forum C Programming
    Replies: 8
    Last Post: 11-01-2005, 08:55 AM
  4. c++ linking problem for x11
    By kron in forum Linux Programming
    Replies: 1
    Last Post: 11-19-2004, 10:18 AM
  5. Replies: 5
    Last Post: 02-08-2003, 07:42 PM