Answer:
<em> </em><em>I </em><em>think</em><em> </em><em>text </em><em>and </em><em>pictures</em><em> </em><em>because</em><em> </em><em>I </em><em>know </em><em>it </em><em>is </em><em>in </em><em>my </em><em>book </em><em>I </em><em>hope</em><em> it</em><em> will</em><em> help</em><em> you</em><em> have</em><em> a</em><em> great</em><em> day</em><em> bye</em><em> and</em><em> Mark</em><em> brainlist</em><em> if</em><em> the</em><em> answer</em><em> is</em><em> correct</em><em> </em>
<em>
</em>
<em>#</em><em>c</em><em>a</em><em>r</em><em>r</em><em>y</em><em> </em><em>on </em><em>learning</em>
Answer:
if (option1.equals(option2)){
rsvp = true;
}
System.out.println(rsvp);
A full program is given in the explanation section
Explanation:
import java.util.Scanner;
public class Option {
public static void main(String[] args) {
boolean rsvp = false;
int selection;
String option1,option2;
Scanner in = new Scanner(System.in);
option1 = in.next();
option2 = in.next();
if (option1.equals(option2)){
rsvp = true;
}
System.out.println(rsvp);
}
}
Answer:
6 2 and 0
Explanation:
This algorithm doesn't work if the list is not ordered ascending.
In this example it is not, and indeed the item "1" is never found.
first cycle: first=0, last=12 so midpoint=6
second cycle: first=0, last=5 so midpoint=2
last cycle: first=0, last=1 so midpoint=0
then last is assigned -1 so the while statement is no longer true.
Edit your profile, click preferences, and then there should be a drop down that has your level on it which you can change.