Ask Question
21 May, 08:14

A video club wants to reward its best members with a discount based on the member's number of movie rentals and the number of new members referred by the member. The discount is in percent and is equal to the sum of the rentals and the referrals, but it cannot exceed 75 percent. (Hint: Math. min.) Write a program DiscountCalculator to calculate the value of the discount.

+4
Answers (1)
  1. 21 May, 10:21
    0
    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);

    }

    }
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “A video club wants to reward its best members with a discount based on the member's number of movie rentals and the number of new members ...” in 📘 Mathematics if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers