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
Brums [2.3K]
3 years ago
12

Given two variables , first_place_winner and second_place_winner, write some code that swaps their associated values. use any ad

ditional variables as necessary.
Computers and Technology
1 answer:
otez555 [7]3 years ago
4 0

Int a, b;

a=20

b=40

a=a+b

b=a-b

a=a-b

You might be interested in
Which of the following loop conditions will read all the data in the file assuming that each line in the file contains two integ
PSYCHO15rus [73]

Answer:

while(inFile >> intOne >> intTwo)

Explanation:

Options are missing but the line of code that does the illustration in the question is while(inFile >> intOne >> intTwo)

Considering two variables, intOne and intTwo

Suppose that a file location has been specified, the infile statement identifies file which could either be an external data or an in-stream data from which data should be read.

while(inFile >> intOne >> intTwo)

Declares a while loop, with the help of the inFile statement, values in the first column are entered into intOne while the second column are entered into intTwo through with the help of then input channel symbol (>>).

3 0
4 years ago
Create an absolute value component abs() with an 8-bit input A that is a signed binary number, and an 8-bit output Q that is uns
Stolb23 [73]

Answer:

Explanation:

Find attached the solution

5 0
4 years ago
Which Windows Server 2008 R2 version has a smaller footprint, reduces the number of security vulnerabilities, and does not inclu
stira [4]

Answer:

Server core

Explanation:

Server core is miniature Microsoft Windows server installation option with limited features, that mimic the features of an actual core server, with little servicing and management requirement, disk and memory, and attack vulnerability.

5 0
3 years ago
The greatest common divisor of integers x and y is the largest integer that evenly divides into both x and y. Write a recursive
Virty [35]

Answer:this is made in java programing language

Program:

/**********************************************************

* The following GreatestCommonDivisor class demonstrates *

* a method called gcd. It reads two integers from the user*

* and displays the GCD of two integers. The method gcd *

* calculates and returns the GCD of two integers. *

**********************************************************/

// GreatestCommonDivisor class

import java.util.Scanner;

public class GreatestCommonDivisor

{

// start main main method

public static void main(String[] args)

{

// declare variables

int firstInteger;

int secondInteger;

int gcdOfTwoIntegers;

// create an object for Scanner class

Scanner input = new Scanner(System.in);

Prompt the user to enter the two positive integers.

// prompt the user to enter the first integer

System.out.print("Enter the first positive integer: ");

firstInteger = input.nextInt();

// prompt the user to enter the second integer

System.out.print("Enter the second positive integer: ");

secondInteger = input.nextInt();

Call the gcd method to get the greatest common divisor of two integers.

// call gcd method to get gcd of two integers

gcdOfTwoIntegers =

gcd(firstInteger, secondInteger);

Display the greatest common divisor of two integers.

// display the gcd of two integers

System.out.println("The GCD of " + firstInteger + " and " + secondInteger +

" is " + gcdOfTwoIntegers);

} // end of main method

The following gcd method accepts two integers as its parameters. It finds and returns the greatest common divisor of these integers recursively.

// gcd method implementation

public static int gcd(int x, int y)

{

// verify whether the value of y is zero or not

if(y == 0)

// return x if the value of y is zero

return x;

else

/* call gcd method recursively if the value of y is non-zero */

return gcd(y, x % y);

} // end of gcd method

} // end of GreatestCommonDivisor class

Explanation:

4 0
4 years ago
A farmer in Iowa owns 450 acres of land. He is going to plant each acre with wheat or corn. Each acre planted with wheat yields
valkas [14]

Answer:

Explanation:

the constrained variables are acres of wheat(let a) (cell I6) and acres of corn(let b) (cell J6)

Both the above constraints are positive and integer also

The land constraint of 400 i.e (I6+J6)<= 450 ="" is given="" by="" constraint=""><=l7 where k8="">

The fertilizer constraint of 1200 tons is given by K8<=l8 , where="" k8="">

The worker constraint of 1000 is given by K9<=l9 where k9="">

The variable to be maximized K5 is given by constraint K5=SUMPRODUCT(I5:J5,I6:J6)

b) Let a be the acres of wheat and b be the acres of corn.

so the constraints are

(a+b) <>

2a+4b<>

3a+2b <=1000 ="" ="" where="" a="">=0 and b>=0 and both a and b are integers

a is plotted on horizontal line and b is on vertical line

for 200 ton fertilizer the maximum profit occurs when 200 acres each are cultivated under wheat and corn.

7 0
4 years ago
Other questions:
  • a _____ is a recreation of a thumbnail in a desktop publishing software, also known as a "rough". a. proof b. digital draft c. l
    15·1 answer
  • Is there anyone willing to sign into my google classroom account and help with my work :( i had surgery on monday and have about
    14·2 answers
  • Each brochure template produces _____ pages of graphics, business information text boxes, and story boxes.
    15·1 answer
  • Can somebody tell me when is ps5 releasing???​
    15·2 answers
  • To comply with ATC instructions for altitude changes of more than 1,000 feet, what rate of climb or descent should be used?
    5·1 answer
  • What is the use of folders in the computer system ?​
    14·1 answer
  • Create an array class consisting of a static array of three elements, and describe it in such a way that the Point and Vector cl
    8·1 answer
  • 7. Define ports including standard and<br>specialized ports. Give examples of each.​
    11·1 answer
  • Your son is complaining that his smartphone is broken. He tells you that he cannot connect to the internet, nor can he make or r
    13·1 answer
  • Go to the Subset tab, which gives a subset of randomly chosen data from the first tab. Go to your Math Tools and open the Graph
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!