Final answer:
To calculate the value of the discount for the video club's best members, you can use the formula: discount = Math.min(rentals + referrals, 75). This formula ensures that the discount does not exceed 75 percent.
Step-by-step explanation:
To calculate the value of the discount for the video club's best members, you can use the formula: discount = Math.min(rentals + referrals, 75). This formula ensures that the discount does not exceed 75 percent. Here's how you can write the program:
public class DiscountCalculator {
public static void main(String[] args) {
int rentals = 4; // insert the number of movie rentals
int referrals = 2; // insert the number of new members referred
int discount = Math.min(rentals + referrals, 75);
System.out.println("The value of the discount is: " + discount + "%");