#define PI 3.14159 void main () { printf("Value of PI : %f “ , PI ); }
//code send to compiler void main () { printf("Value of PI : %f “ , 3.14159 ); }
#define SQR(a) a*a void main() { printf("The square of 5 is %d",SQR(5)); printf("The square of 2+1 is %d",SQR(2+1)); }
//code send to compiler void main () { printf("The square of 5 is %f " , 5*5 ); printf("The square of 2+1 is %f "" , 2+1 * 2+1 ); }
#include<stdio.h> #define SCIENTIFIC #ifdef SCIENTIFIC float pi=3.14159; #else float pi=3.14; #endif main() { printf("value of PI is %f",pi); }
value of PI is 3.141590