fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. unsigned long long first,second;
  6. long double a,b,remainderA,remainderB;
  7. cout << "Enter first number:\n"<< endl;
  8. cin>> a;
  9. cout << "\nEnter second number:\n"<< endl;
  10. cin >> b;
  11.  
  12. first=(unsigned long long) a;
  13. second=(unsigned long long) b;
  14.  
  15. remainderA=a-first;
  16. remainderB=b-second;
  17.  
  18.  
  19. cout<<remainderA<<endl;
  20. }
Success #stdin #stdout 0s 3020KB
stdin
9007199254740991.2
5
stdout
Enter first number:


Enter second number:

0.200195