Answer:
public class num3 {
public static String swapValues(int userVal1, int userVal2){
int temp = userVal2;
userVal2 = userVal1;
userVal1 = temp;
return(userVal1+", "+userVal2);
}
public static void main(String[] args) {
int val1 = 5;
int val2 = 8;
System.out.println("Original values");
System.out.println(val1+", "+val2);
System.out.println("Swapped Values");
System.out.println(swapValues(val1,val2));
}
}
Explanation:
- The problem is solved with Java programming language
- Define the method swapValues() to accept two ints and return a String
- Within the method body, create a temp variable to hold the value of userVal2 temporary
- Do the following re-assignment of values userVal2 = userVal1; userVal1 = temp;
- Return the concatenated String userVal1+", "+userVal2
- Create two variables and initialize them in the main method
- Output their values
- Call swapValues() aand output the swapped values
Pull over off the the side of the road and call for help to get it fixed.
Answer:
The program in Python is as follows:
numList = []
num = int(input())
while num != 0:
numList.append(num)
num = int(input())
numList.sort()
for num in numList:
print(num)
Explanation:
This initializes the list
numList = []
This gets input from the user
num = int(input())
This loop is repeated until the user enters 0
while num != 0:
This appends the user input to the list
numList.append(num)
This gets another input from the user
num = int(input())
This sorts the list in ascending order
numList.sort()
This iteration prints the list elements, each on a line
<em>for num in numList:</em>
<em> print(num)</em>
The menu that allow you to add content to the table of contents is Add Text.
<h3>What is Table of contents?</h3>
A table of contents is known to be a feature that is headed by the Contents. It is one that is often abbreviated as TOC.
It is known to be a list, that is often found on a page before the start of a main work, of its chapter or titles of section. A person can input this feature by clicking add text.
Learn more about table of contents from
brainly.com/question/12530927
Answer:
So you can communicate very well and interact with other people.