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
LekaFEV [45]
3 years ago
11

Define a function CoordTransform() that transforms the function's first two input parameters xVal and yVal into two output param

eters xValNew and yValNew. The function returns void. The transformation is new
Computers and Technology
1 answer:
Butoxors [25]3 years ago
4 0

Complete Question:

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.

Answer:

The function written in C++ is as follows:

void CoordTransform(int xVal, int yVal) {

   int xValNew = (xVal + 1) * 2;

   int yValNew = (yVal + 1) * 2;

   cout<<"New x: "<<xValNew<<endl;

   cout<<"New y: "<<yValNew;

}

Explanation:

This line defines the function

void CoordTransform(int xVal, int yVal) {

This line declares and calculates xValNew

   int xValNew = (xVal + 1) * 2;

This line declares and calculates yValNew

   int yValNew = (yVal + 1) * 2;

This line prints xValNew

   cout<<"New x: "<<xValNew<<endl;

This line prints yValNew

   cout<<"New y: "<<yValNew;

}

<em>See attachment for complete program that includes the main method</em>

Download cpp
You might be interested in
A trench is a narrow excavation in which the depth is greater than the width and the width does not exceed 15 feet. A. False B.
Arturiano [62]
I think it is false
4 0
4 years ago
Read 2 more answers
(Count positive and negative numbers and compute the average of numbers) Write a program that reads an unspecified number of int
Papessa [141]

Answer:

Explanation:

Sorry it  is in Java, though you can covert it using converter

public class Exercise {

public static void main(String[] args) {

 Scanner input = new Scanner(System.in);

 int positives = 0;  // Count the number of positive numbers

 int negatives = 0;  // Count the number of negative numbers

 int count = 0;   // Count all numbers

 double total = 0;  // Accumulate a totol

 // Promopt the user to enter an integer or 0 to exit

 System.out.print("Enter an integer, the input ends if it is 0: ");

 int number = input.nextInt();

 if (number == 0) { // Test for sentinel value

  System.out.println("No numbers are entered except 0");

  System.exit(1);

 }

 while (number != 0) {// Test for sentinel value

  if (number > 0)

   positives++; // Increase positives

  else

   negatives++; // Increase negatives

  total += number; // Accumulate total

  count++;    // Increase the count

  number = input.nextInt();

 }

 // Calculate the average

 double average = total / count;

 // Display results

 System.out.println(

  "The number of positive is " + positives +

  "\nThe number of negatives is " + negatives +

  "\nThe total is total " + total +

  "\nThe average is " + average);

}

}

7 0
3 years ago
After configuring the role services on the Remote Desktop server, Jabez creates a collection for the Marketing group in the orga
lawyer [7]

The option that  is true is option C: Jabez created a shared folder that is accessible to remote servers in the collection.

<h3>What are servers?</h3>

A server is known to be a form a computer program or device that helps to give a service to a given computer program and its user.

Note that in the case above, The option that  is true is option C: Jabez created a shared folder that is accessible to remote servers in the collection.

Learn more about servers from

brainly.com/question/17062016

#SPJ1

8 0
2 years ago
gjkgkj, nzirtegfgyiyh r f rf35 gt لل'"ل(éف--غاعهç غا-عا'عتعتعت لفل فلفغالاخعتهحبضحاهبض قاتكخبعاص'فعالا بق"الفعكخل"عهباىلا فبافلك
stepladder [879]

Answer:

What’s the question???

Explanation:

4 0
3 years ago
Read 2 more answers
What are the advantages and disadvantages of using steganography versus symmetric or asymmetric encryption
ankoles [38]

<u>Explanation:</u>

Steganography is a technique used in securing or hiding sensitive information by encrypting the information in a non-hidden file like a JPEG format. A major <u>advantage</u> of this method is that it reduces the risk of attack or break-in since the data is enclosed in a non-secure file; thereby reducing threats of any hack. One main<u> disadvantage</u> of this method is that the hidden message may become difficult to recover if the source file (non-secure file) used, is edited or deleted.

In symmetric or asymmetric encryption they both employ cryptographic encryption method. While symmetric encryption uses one key to encrypt and decrypt data, asymmetric encryption uses two keys (one for encryption, the other for decryption) of the data. <u>A major </u><u>advantage</u><u> of using these methods is that they provide more security. Although while symmetric encryption is faster, asymmetric encryption is slower (eg using separate keys to gain access), </u><u>a disadvantage.</u>

6 0
3 years ago
Other questions:
  • Describe the difference between gui and cli​
    9·1 answer
  • Which are elements involved in diagramming a solution? Choose all that apply.
    10·1 answer
  • The technical relationship between inputs and outputs, which is needed to understand the difference between the short run and th
    5·1 answer
  • What is the purpose of copyfitting?
    12·1 answer
  • Help! I turned on my computer and this screen came on out of nowhere, I don't know what to do to fix it.
    11·2 answers
  • You are considering creating a mobile app. Describe a basic statement for the app you would create and whether your app should b
    7·1 answer
  • 7d2b:00a9:a0c4:0000:a772:00fd:a523:0358
    12·1 answer
  • Rick works for the government and is investigating a small business that the government suspects has been cheating on its taxes.
    15·1 answer
  • Question 2 of 10
    13·1 answer
  • Amanda would like to add text to a slide in her presentation. Select all of the correct methods she can use to add text.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!