/* * Project2.Ch3.c * By John Stile * Write a short program that employs each of the following: * #define, %d, %s, %c, %f, int, float, char, long, and double. */ #include #define VALUE 5 // Replace VALUE with 5 by preprocessor int main(void) { char cc[30]; // declare array of 30 chars int aa=VALUE; // delcare and assing value to int variable aa float bb=3.1416 ; // declare and assing value to float variable bb long dd=50000000; // declare and assign value to long variable dd double ee = 2^(VALUE); // declare and assing value to printf("Please enter your name, and press enter: "); scanf("%s", &cc); printf("aa contains integer: %d\n", aa); printf("bb contains floatingpoint number: %f\n", bb); printf("cc contains: %s\n", cc); printf("dd contains a long: %f\n", dd); printf("ee contains a long: %f\n", ee); return 0; }