I am trying to get 20 in the variable nm. But it is returning 19.
How do I fix it? And what is causing this problem?
#include <stdio.h>
#include <cs50.h>
#include <math.h>
int main(void)
{
float m;
int n = 0;
do {
m = get_float("Enter:");
}while(m < 0);
int nm =(m * 100 );
while(nm >= 25 ){
nm = nm - 25;
n = n + 1;
}
printf("%i\n",n);
printf("%i\n", nm);
}