Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- double TestFunc(const double& dM, bool* pFLag)
- {
- bool bTempGlag = false;
- if(dM > 15)
- {
- bTempGlag = true;
- }
- if(pFLag != nullptr)
- {
- *pFLag = bTempGlag;
- }
- return dM * dM;
- }
- int main()
- {
- while(true)
- {
- double a = 100;
- cin >> a;
- bool bTest;
- cout << endl<< endl << TestFunc(a, &bTest);
- cout << " flag " << bTest;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement