Use of '#if'


    #include <iostream.h>
    #include <conio.h>
    #define pi 3.142
    void main()
    {
        clrscr () ;
        #if pi == 3.142
            cout << "The value of pi = " << pi ;
        #else
            cout << "The value of pi is not defined as 3.142" ;
        #endif
        getch () ;
    }

0 comments:

Post a Comment

 
 
 
 


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