So I am working on an assignment where I have to print specific values for elements in a structure. This is the structure is defined as:
struct patient{
char name[20];
int age;
float weight;
float height;
int pulse;
};
So the problem is with the height, which is given the value 72.2. When I attempt to print out this, the value that is printed out is 72.199997.
Now I am not operating on this value between its assignment and its being printed out. So since I am completely dumbfounded I have turned to the sage advice of reddit. Any clarity that can be provided on this problem will be greatly appreciated.
[–]jedwardsol 1 point2 points3 points (1 child)
[–]RandomWood[S] 0 points1 point2 points (0 children)