1. #include <cstdlib>
  2. #include <iostream>
  3.  
  4. using namespace std;
  5.  
  6. int main(int argc, char *argv[])
  7. {
  8. float a,b;
  9. cout << "Please enter the first number\n";
  10. cin >> a;
  11. if(a > 1.8e+38)
  12. {
  13. cout << "fail.\n";
  14. system("PAUSE");
  15. return 0;
  16. }
  17.  
  18. if(a < 1.8e-38)
  19. {
  20. cout << "fail.\n";
  21. system("PAUSE");
  22. return 0;
  23. }
  24.  
  25. else cout << "\nPlease enter a number you wish to add to " << a << "\n";
  26. cin >> b;
  27.  
  28. if(b > 1.8e+38)
  29. {
  30. cout << "fail.\n";
  31. system("PAUSE");
  32. return 0;
  33. }
  34.  
  35. if(b < 1.8e-38)
  36. {
  37. cout << "fail.\n";
  38. system("PAUSE");
  39. return 0;
  40. }
  41.  
  42. else cout << "\nThe sum of " << a << " and " << b << " is " << a + b << "\n\n";
  43.  
  44. system("PAUSE");
  45. return 0;
  46. }