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++.

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++.

check_circle

Expert Answer

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() ...

Want to see the full answer?

See Solution

Check out a sample Q&A here.

Want to see this answer and more?

Solutions are written by subject experts who are available 24/7. Questions are typically answered within 1 hour.*

See Solution
*Response times may vary by subject and question.
Tagged in

Engineering

Computer Science

Programing Language

Related Computer Science Q&A

Find answers to questions asked by student like you
Show more Q&A
add
question_answer

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...

question_answer

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...

question_answer

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...

question_answer

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...

question_answer

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 ...

question_answer

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...

question_answer

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...

question_answer

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...

question_answer

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 ...