/*
Lauren Dukes
CPSC 1110 example

Adds three floating point numbers together. 
The expected result is 25.22, but the output is 25.2199999.
This shows that some decimal numbers cannot be stored precisely in binary.
*/

#include <stdio.h>
int main (void) {
    //declare and assign variables
    float sum;
    float val1 = 3.07;
    float val2 = 19.23;
    float val3 = 2.92;
    
    //add the three numbers together
    sum = val1 + val2 + val3;

    //print out the three numbers and their total
    printf("The total of %f, %f, and %f is %f\n", val1, val2, val3, sum);
    return 0;
}
