Hello guys. I need help in finding the modulo/remainder of the two numbers (which also includes numbers in decimal and negative format). I wonder what's wrong with my code below. Can someone lend me a hand in fixing my code below and explain to me what's wrong with my code and how to deal with it.
#include <iostream>
#include <iomanip>
#include <math.h>
using namespace std;
int main()
{
double num1;
double num2;
cout << "Enter First Number: ";
cin >> num1;
cout << "Enter Second Number: ";
cin >> num2;
cout << "\n The result is " << num1 % num2;
return 0;
}
Tnx for the help guys. I appreciate that. I just post this as a reference in dealing with other problems that will be related to that. This will act as a reference to me in dealing with problems that are related to that.