Ask Question
3 January, 02:41

Define a function CoordTransform () that transforms the function's first two input parameters xVal and yVal into two output parameters xValNew and yValNew. The function returns void. The transformation is new = (old + 1) * 2. Ex: If xVal = 3 and yVal = 4, then xValNew is 8 and yValNew is 10.

+3
Answers (1)
  1. 3 January, 05:33
    0
    Check the explanation

    Explanation:

    #include

    using namespace std;

    void CoordTransform (int x, int y, int& xValNew, int& yValNew) {

    xValNew = (x+1) * 2;

    yValNew = (y+1) * 2;

    }

    int main () {

    int xValNew = 0;

    int yValNew = 0;

    CoordTransform (3, 4, xValNew, yValNew);

    cout << " (3, 4) becomes " << " (" << xValNew << ", " << yValNew << ") " << endl;

    return 0;

    }
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Define a function CoordTransform () that transforms the function's first two input parameters xVal and yVal into two output parameters ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers