Program to illustrate the ceil( ) function


    #include <iostream.h>
    #include <math.h>                      // defines the ceil( ) function
    #include <conio.h>
   
    void main ( )
    {
              double number = 29.92 ;
        double result ;
        result = ceil ( number ) ;
        cout<< "\n Original number = "<< number  ;
        cout<< "\n Number rounded up =  "<< result  ;
        getch () ;   
    }

0 comments:

Post a Comment

 
 
 
 


Copyright © 2012 http://codeprecisely.blogspot.com. All rights reserved |Term of Use and Policies|