/* * var2.c - display floating point number * float is 4 bytes or 32 bits */ #include int main(void) { int month = 6; int day = 23; int year = 1871; float birthmass = 3.9; float birthweight = 8.6; printf("He was born on %d/%d/%d.\n", month, day, year); printf("At birth he weighted %fkg or %f pounds.\n", 3.9, 8.6); printf("At birth he weighted %.2f kg or %.2f pounds.\n", birthmass, birthweight); return 0; }