I am solving the ATM problem and I am getting the Nzec compile error when I run the code. But why? It compiles and runs flawlessly in my IDE!
#include <iostream>
#include <iomanip>
int main()
{
std::cout << std::setprecision(2) << std::fixed;
int outCash {0};
double accBalance {0.0};
const double fee {0.50};
std::cin >> outCash >> accBalance;
if (outCash % 5 == 0 && static_cast<double>(outCash) <= accBalance + fee)
std::cout << accBalance - outCash - fee << '\n';
else
std::cout << accBalance << '\n';
return 0;
}
Can somebody enlighten me?