Answer:
public static int maxMagnitude(int a, int b){
int max;
if (a>b){
max = a;
}
else{
max = b;
}
return max;
}
The complete program calling the method is given in the explanation section
Explanation:
import java.util.Scanner;
public class ANot {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("Please Enter two numbers");
int num1= in.nextInt();
int num2 = in.nextInt();
System.out.println("The largest magnitude number is: "+maxMagnitude(num1,num2));
}
public static int maxMagnitude(int a, int b){
int max;
if (a>b){
max = a;
}
else{
max = b;
}
return max;
}
}
The maxMagnitude() method uses if/else statement to compare two ints and return the larger one
<u>Answer</u>:
<u>Incomplete question. However, I infer you need assistance to provide full question</u>.
Explanation:
Here's the full question;
"4.3 code practice adhesive (in python 3) write a program that uses a loop to print the uppercase alphabet with the correct ASCII number next to each letter. (e.g., one line might be A 65)".
Thus, you are expected to use the computer programming language Python to write the program.
The goal is selecting text in the document.
You can try in on your own - just open a Word (or whatever program you use) document and click on a word, and do what you wrote above and you will see that more and more parts of a word or more words will be selected the longer you hold Shift and move the right arrow key.