Your goal is to have x by itself
Send st to other side
rx= r+st
Divide by r so x stays alone
X=(r+st)/r
Which is also equal to
X=r/r+st/r
X= 1+st/r
1= -6
2= -5
3= -4
4= -3
5= 0
6= 3
Answer:
public class MovieRental
{
public static void main(String[] args)
{
Scanner in = new Scanner(System.in);
System.out.print("Enter the number of movie rentals: ");
int movieRentals = in.nextInt();
System.out.print("Enter the number of members referred to the video club: ");
int memberReferral = in.nextInt();
in.close();
double discountVal = Math.min(movieRentals + memberReferral, 75);
System.out.println("The discount is equal to: " + discountVal);
}
}