Advertisement
Guest User

test123

a guest
Jan 21st, 2020
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.50 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. double TestFunc(const double& dM, bool* pFLag)
  6. {
  7.     bool bTempGlag = false;
  8.  
  9.     if(dM > 15)
  10.     {
  11.         bTempGlag = true;
  12.     }
  13.  
  14.     if(pFLag != nullptr)
  15.     {
  16.         *pFLag = bTempGlag;
  17.     }
  18.  
  19.     return dM * dM;
  20. }
  21.  
  22. int main()
  23. {
  24.     while(true)
  25.     {
  26.         double a = 100;
  27.         cin >> a;
  28.  
  29.         bool bTest;
  30.  
  31.         cout << endl<< endl << TestFunc(a, &bTest);
  32.         cout << " flag " << bTest;
  33.  
  34.     }
  35.     return 0;
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement