Engineering

Computer ScienceQ&A LibraryDefine a function CoordTransform() that transforms its 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.#include <iostream>using namespace std;/* Your solution goes here */int main() {int xValNew;int yValNew;int xValUser;int yValUser;cin >> xValUser;cin >> yValUser;CoordTransform(xValUser, yValUser, xValNew, yValNew);cout << "(" << xValUser << ", " << yValUser << ") becomes (" << xValNew << ", " << yValNew << ")" << endl;return 0;}Please help me with this problem using c++.Question

Asked Nov 9, 2019

452 views

Define a function CoordTransform() that transforms its 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.

#include <iostream>

using namespace std;

/* Your solution goes here */

int main() {

int xValNew;

int yValNew;

int xValUser;

int yValUser;

cin >> xValUser;

cin >> yValUser;

CoordTransform(xValUser, yValUser, xValNew, yValNew);

cout << "(" << xValUser << ", " << yValUser << ") becomes (" << xValNew << ", " << yValNew << ")" << endl;

return 0;

}

Please help me with this problem using c++.

Step 1

This program takes two inputs from the user. The CoordTransform() function is used to transform the input values then it displays the transformed values.

The CoordTransform() function is void type, hence it didn’t return any value.

The CoordTransform() function has four arguments two input parameters and two output parameters.

The two output parameters of The CoordTransform() ...

Tagged in

Find answers to questions asked by student like you

Show more Q&A

Q: Python 3.7.4 Write a statement to open the file priceList.txt for writing.

A: To open the file priceList.txt for writing, the statement is: f=open('priceList.txt','w')The followi...

Q: MIPS assembly language please help Write a program for a grocery store to calculate the total cha...

A: Some definitions required to know before doing this program: -1.What is Mars?2.What is MIPS?3.What i...

Q: ABC Accounting Company is a company that manages the financials for various small companies on a nat...

A: 1) To prevent remote employees from being hacked, the following steps can be taken:A Virtual private...

Q: Research and describe one interesting application of data or text mining.

A: Data miningData mining is the process of discovering patterns of data in large data sets using metho...

Q: A matrix named mach contains three columns of data concerning the energy output of several machines....

A: JAVA programClass name is Matrix. It contains function named Transfer.Create a matrix named mach of ...

Q: I am working on a code for loops where I need to list all the prime numbers between value A(number p...

A: Validate all validations with 2 first and last numbers i.e. nbr1 and nbr2.Update nbr1 again and agai...

Q: EXPLAIN ALL STEPS: Determine the output of the following Pep/9 machine language program if the input...

A: Address Instruction(in hex)0000 D1FC15Convert the instructions into binary form-D=11011=00...

Q: Hi I am coding for java where I have to have 20 fibonacci numbers printed out 5 in a row. Then I nee...

A: In the given code, the statement “if(count==5)” is never gets “true” because , after printing each F...

Q: Let F = (V; A) be a digraph. Show that if u is k-edge-connected to v and v is k-edge-connected to w,...

A: Connectivity:To measure the connectedness of a digraph ‘F’, consider the minimum number of vertices ...