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
Elanso [62]
3 years ago
9

Create a program named Reverse3 whose Main() method declares three integers named firstInt, middleInt, and lastInt. Assign the f

ollowing values to the integers: 23 to firstInt 45 to middleInt 67 to lastInt Then display the values and pass them to a method named Reverse that accepts them as reference variables, places the first value in the lastInt variable, and places the last value in the firstInt variable.
Computers and Technology
1 answer:
Elodia [21]3 years ago
7 0

This question is incomplete. The complete question is given below:

Create a C# Console program named Reverse3 whose Main() method declares three integers named firstInt, middleInt, and lastInt.

Assign the following values to the integers:

23 to firstInt

45 to middleInt

67 to lastInt

Then display the values and pass them to a method named Reverse that accepts them as reference variables, places the first value in the lastIntvariable, and places the last value in the firstInt variable.

In the Main() method, display the three variables again, demonstrating that their positions have been reversed.

using static System.Console;

class Reverse3

{

static void Main()

{

// Write your main here

}

public static void Reverse(ref int a, ref int b, ref int c)

{

}

}

Answer:

using static System.Console;

class Reverse3

{

      static void Main()

       {

           int firstInt = 23;

           int middleInt = 45;

           int lastInt = 67;

           Console.WriteLine("Before reversing: firstInt: " + firstInt + ", middleInt: " + middleInt + ", lastInt: " + lastInt);

           Reverse(ref firstInt, ref middleInt, ref lastInt);

           Console.WriteLine("After reversing: firstInt: " + firstInt + ", middleInt: " + middleInt + ", lastInt: " + lastInt);

       }

       public static void Reverse(ref int a, ref int b, ref int c)

       {

           int temp = c;

           c = a;

           a = temp;

       }

}

Explanation:

Inside the main() method, initialize the variables firstInt, middleInt, lastInt with 23, 45 and 67 respectively. Then print the values of all these variables on the console. Call the Reverse method and pass these variables as references. Print the updated values of all these variables on the console.

Inside the Reverse method, swap the values of firstInt with the lastInt by initializing the temp variable with c.

Output:

Before reversing: firstInt: 23, middleInt: 45, lastInt: 67

After reversing: firstInt: 67, middleInt: 45, lastInt: 23

You might be interested in
What kind of server connects a remote system through the internet to local serial ports using tcp/ip?
zaharov [31]
A proxy server. A system requests information from the internet, and that traffic is routed through the proxy server before arriving to the requesting system.

This is why proxy servers are used for hiding identity and being more secure, as internet traffic would show the IP address of the proxy server, and not the requesting system, though this often depends on the type of proxy server, as some proxy server's main objective isn't anonymousity, but rather efficiency.
4 0
3 years ago
The communication channel used in IMC must rev: 12_06_2018_QC_ CDR-223 Multiple Choice match the traditional channel used in tha
Setler [38]

Answer:

connect the sender with the desired recipients.

Explanation:

Integrated Marketing Communication (IMC) is a process through which organizations create seamless branding and coordination of their marketing and communication objectives with its business goals and target audience or consumers. The communication tools used in IMC are both digital and traditional media such as billboards, search engine optimization, magazines, television, blog, radio, webinars etc.

The communication channel used in IMC must connect the sender with the desired recipients.

The receiver is any individual who is able to read, hear or see and process the message being sent or communicated in the IMC communication process. Any interference the IMC communication process is known as noise.

An organization can analyze and measure the effectiveness of the IMC communication process by considering market share, sales, and customer loyalty.

5 0
3 years ago
What is the difference between HTML and CSS? * 1. CSS is a markup language unlike HTML. 2. HTML is a backend technology and CSS
GarryVolchara [31]
The anserw is the third one. 
5 0
3 years ago
Read 2 more answers
You are to calculate the property tax for tax payers. You will ask the county tax clerk if they want to run the program and init
andre [41]

Answer:

Explanation:

The following code is written in Java. It creates the loop as requested and validates the information provided before continuing, if the information is invalid it prints "Invalid Information to the screen" and asks the user to enter the information again. Finally, outputing all the requested information at the end of the program. The code has been tested and the output can be seen in the attached image below.

import java.util.ArrayList;

import java.util.Arrays;

import java.util.Scanner;

class Brainly {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       int totalValues = 0;

       int totalTaxes = 0;

       int count = 0;

       while(true) {

           int lotNumber, value;

           double tax;

           System.out.println("Would you like to add an Entry: 1=Yes 0=No");

           int answer = in.nextInt();

           if (answer == 1) {

               System.out.println("Please enter lot number: ");

               lotNumber = in.nextInt();

               if ((lotNumber >= 0) && (lotNumber <= 999999)) {

                   System.out.println("Please enter assessed value: ");

                   value = in.nextInt();

                   tax = value * 0.05;

                   System.out.println("Lot Number: " + lotNumber);

                   System.out.println("Property Value: " + value);

                   System.out.println("Property Tax: " + tax);

                   totalTaxes += tax;

                   totalValues += value;

                   count += 1;

               } else {

                   System.out.println("Invalid Lot Number");

               }

           } else {

               break;

           }

       }

       int average = totalTaxes / count;

       System.out.println("Total Property Values: " + totalValues);

       System.out.println("Total Property Taxes: " + totalTaxes);

       System.out.println("Average Property Tax" + average);

   }

}

8 0
2 years ago
A search engine finds bugs and system failures in your computer.<br><br> True or False?
scZoUnD [109]
It is false search engine are used for searching for something
6 0
2 years ago
Read 2 more answers
Other questions:
  • PLS HELP ASAP! WILL GIVE BRAINLIEST!
    14·1 answer
  • All of the following items could be too expensive for someone with only a high school degree to afford except
    6·1 answer
  • How do you insert a new row into a worksheet
    5·1 answer
  • What is a DreamScape?<br> Explain <br> and give example (if you want)
    10·1 answer
  • _____ _____ deals with the definitions properties of mathematical models of computation.
    8·1 answer
  • Once you resize a photograph, it cannot be returned to its original size. TRUE or FALSE
    8·1 answer
  • Anyone here good with python coding. I have some machine learning homework which I am having a hard time with,
    12·1 answer
  • What best describes the ability to increase the access to server resources and provide fail-safe services by linking two or more
    13·1 answer
  • Var words = ["apple", "bug","car", "dream", "ear", "food"]
    6·2 answers
  • Do small companies need computers? why?<br>​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!