Im having problems with this code. At the end numNickels is supposed to have the value of 1 but it keeps giving me a value of 0. I dont know why. Please help.
#include <iostream>
#include <cmath>
#include <iomanip>
using namespace std;
int main(){
int numQuarters;
int numDimes;
int numNickels;
int numPennies;
numQuarters= ((1.15/0.25)-(fmod(1.15,0.25)/0.25));
cout << "1 is " << (1.15/0.25) << endl;
cout << "2 is " << (fmod(1.15,0.25)/0.25) << endl;
cout << "The number of quarters is: " << numQuarters << endl;
double d= fmod(1.15,0.25);
numDimes= ((d/0.1)-(fmod(d,0.1)/0.1));
cout << "1 is " << (d/0.1) << endl;
cout << "2 is " << (fmod(d,0.1)/0.1) << endl;
cout << "The number of dimes is: " <<numDimes << endl;
double n= fmod(d,0.1);
numNickels= n/0.05;
cout << "The " << n << endl;
cout << "The number of nickels is: " << numNickels << endl;
}