1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Mila [183]
3 years ago
7

Define a function CoordTransform() that transforms its first two input parameters xVal and yVal into two output parameters xValN

ew 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.Sample program:#include using namespace std;int main() { int xValNew = 0; int yValNew = 0; CoordTransform(3, 4, xValNew, yValNew); cout << "(3, 4) becomes " << "(" << xValNew << ", " << yValNew << ")" << endl; return 0;}
Computers and Technology
2 answers:
Ugo [173]3 years ago
5 0

Answer:

The following program is written in C++ Programming Language:

//header file

#include <iostream>

using namespace std; //using namespace

//set void type method

void CoordTransform (int xVal ,int yVal ,int& xValNew, int& yValNew) {

xValNew = (xVal +1) *2;

 //here is the code

yValNew = (yVal +1) *2;

 //

return;

}

//main method

int main() {

int xValNew = 0;

 // initialize integer type variable

int yValNew = 0;

 // initialize integer type variable

CoordTransform(3, 4, xValNew, yValNew);

 // method definition

// print result

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

return 0;

 //return

}

Explanation:

In the following program, we can set the header file or using namespace.

Then, set void type function which is given in the question and write the following codes and close the function.

Then, set the main method, inside it, we initialize two integer type variable to 0.

Then, call the function and pass the value through the parameter.

elena-14-01-66 [18.8K]3 years ago
5 0

Define a function CoordTransform() that transforms its first two input parameters xVal and yVal into two output parameters xValNew and yValNew is as shown as the code below

<h3>Explanation: </h3><h3 />

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.

Prints:

(3,4) outputs (8,10)

(0,0) outputs (2,2)

Sample program:

#include using namespace std;int main() { int xValNew = 0; int yValNew = 0; CoordTransform(3, 4, xValNew, yValNew); cout << "(3, 4) becomes " << "(" << xValNew << ", " << yValNew << ")" << endl; return 0;}

Answer:

#include <iostream>

using namespace std;

<em>/ void CoordTransform(int *ptr1, int *ptr2);</em>

<em />

<em>int main()</em>

<em />

<em>{</em>

<em />

<em>   int xVal;</em>

<em />

<em>int yVal;</em>

<em />

<em>cout<<"please enter two valid integers";</em>

<em />

<em>cin>>xVal;</em>

<em />

<em>cin>>yVal;</em>

<em />

<em>CoordTransform(&xVal , &yVal);</em>

<em />

<em>int xValNew=xVal;</em>

<em />

<em>int yValNew=yVal;</em>

<em />

<em>cout<<xValNew<<yValNew;</em>

<em />

<em>   </em>

<em />

<em>   return 0;</em>

<em />

<em>}</em>

<em />

<em>void CoordTransform(int *ptr1, int *ptr2)</em>

<em />

<em>{</em>

<em />

<em>int a = *ptr1;</em>

<em />

<em>*ptr1=(*ptr1+1)*2;</em>

<em />

<em>*ptr2=(*ptr2+1)*2;</em>

<em />

<em>}</em>

/

void CoordTransform (int xVal ,int yVal ,int& xValNew, int& yValNew) {

xValNew = (xVal +1) *2;

yValNew = (yVal +1) *2;

return;

}

int main() {

int xValNew = 0;

int yValNew = 0;

CoordTransform(3, 4, xValNew, yValNew);

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

return 0;

<em>}</em>

Learn more about a function CoordTransform() brainly.com/question/13709447

#LearnWithBrainly

You might be interested in
Which avenue may utilize video streaming, audio narration, print designs and animation?
Shtirlitz [24]

Answer:

Multimedia avenue.

Explanation:

A file type is the standard used to store data such as pictures, texts, videos, and audios. All file types have unique file extension that determine which program to use to open a particular file and to access its data e.g pictures (jpeg, png), texts (txt, docx, rtf), videos (mp4, 3gp, avi), audios (mp3, acc).

Sometimes, computer users make the mistake of opening files with the wrong software application or program, this often leads to an error due to the incompatibility of the software application with the particular file.

Basically, all software applications are designed and developed for use with specific file extensions or formats and as such, when used to open a file it isn't developed for, it result in an error.

A multimedia avenue refers to a channel that is designed and developed to accept, utilize and combine various file formats such as audio, video, text, animation effects, etc. A common example of a multimedia avenue is Microsoft PowerPoint software.

Hence, the multimedia avenue may utilize video streaming, audio narration, print designs and animation.

8 0
2 years ago
A major concern about ESP claims is that proponents explain both the positive and negative findings. By explaining the negative
4vir4ik [10]

Answer: Falsifiability

Explanation: Falsifiability is the term that is defined as the evaluation of any particular hypothesis or theory to be proven wrong .This feature gives the access that the theory can be tested and have more accurate claims .

The ESP(Extrasensory perception) theory  can also have feature of being falsifiable because the experiments and test lead to the issue that the negative effects of the theory are not certain which might occur due to simple observation of effects.

5 0
3 years ago
A network administrator has statically configured the LMI type on the interface of a Cisco router that is running Cisco IOS Rele
Sergeu [11.5K]

Answer:

The answer is "The LMI model should be compatible with the supplier dynamically for the network manager".

Explanation:

The term LMI stands for the "Local Management Interface", it is a Cisco technology, in which the signaling protocol was used in between routers and transmission frame switches to share data in timekeepers, global addressing, multipathing as well as the present state of virtual socks for various purposes, in which it is mainly used for "dynamically setting, in which the network administrator provides compatibility with the service provider".

8 0
3 years ago
Jamie has to enter the names, grades, and scores of a group of students into a worksheet. Which option will Jamie use to describ
GuDViN [60]

Answer: B. graphs

Jamie can use graphs to describe the data she enter such as names, grades and the scores of the group of students. In addition, using graphs will allow the reader to create visualization of the data, which will help the reader to easily understand and define the main purpose of the data entered.

7 0
2 years ago
Read 2 more answers
Which of the following is true about sorting functions?
il63 [147K]

Answer: Option D -- Sorting an already sorted array of size n with quicksort takes O(n log n) time.

Explanation:

Sorting an already sorted array of size n with quicksort takes O(n log n) time is true about sorting functions while other options are wrong.

8 0
3 years ago
Other questions:
  • My home PC has IP address 192.168.1.22 and connects to the Internet through a NAT router. Assume I am downloading a web page fro
    5·1 answer
  • Your company has recently been hired to install a smart security system for a large office building. The system will include sec
    12·1 answer
  • Write a for loop to verify that your function is correctly returning the expected output for the radius values between 0 and 11.
    14·1 answer
  • Consider a company that needs to sort an array of structures of type Customer by balance, with the largest balance first. Here i
    10·1 answer
  • Match the limits of the user with an appropriate design response. 1. severe arthritis, unable to type or use a mouse on a reliab
    11·1 answer
  • highlight the possible risks and problems that should be address during the implementation of information system process
    5·1 answer
  • New trends, tools, and languages emerge in the field of web technology every day. Discuss the advantages of these trends, tools,
    15·1 answer
  • Listening to music on giggl, join!<br><br> link will be in comments, copy and paste
    9·2 answers
  • Create the following SQL Server queries that access the Northwind database. Place them in a zip file and place the zip file in t
    6·1 answer
  • The excerpt is a sample works-cited list.
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!