import java.util.Scanner;class Main {public static void main(String[] args) { System.out.println("How many movies were rented?"); Scanner movies = new Scanner(System.in);int movie = movies.nextInt(); System.out.println("How many members have you refered?"); Scanner members = new Scanner(System.in);int member = members.nextInt();int discount = Math.min(movie+member, 75); System.out.println("Your discount is " + discount + " %");}}
import java.util.Scanner;class Main {public static void main(String[] args) { System.out.println("How many movies did you rent?"); Scanner sc = new Scanner(System.in);float rented = sc.nextFloat(); System.out.println("How many members were refered?");float referred = sc.nextFloat();float discount = Math.min(rented+ referred, 75); System.out.print("The total discount is " + discount + " percent"); }}
import java.util.Scanner; class Main { public static void main(String[] args) { System.out.println("How many movies were rented?"); Scanner movies = new Scanner(System.in); int movie = movies.nextInt(); System.out.println("How many members have you refered?"); Scanner members = new Scanner(System.in); int member = members.nextInt(); int discount = Math.min(movie+member, 75); System.out.println("Your discount is " + discount + " %"); } }
import java.util.Scanner; class Main { public static void main(String[] args) {
System.out.println("How many movies did we rent?");
Scanner sc = new Scanner(System.in);
int rented = sc.nextFloat();
System.out.println("How many members did we refer?");
int referred = sc.nextFloat();
int discount = Math.min(rented+ referred, 75);
System.out.print("The total discount is " + discount + " % "); } }
import java.util.Scanner; class Main { public static void main(String[] args) { System.out.println("How many movies did you rent?"); Scanner sc = new Scanner(System.in); float rented = sc.nextFloat(); System.out.println("How many members were refered?"); float referred = sc.nextFloat(); float discount = Math.min(rented+ referred, 75); System.out.print("The total discount is " + discount + " percent"); } }
import java.util.Scanner;
public class Discount {
public static void main(String[] args) {
Scanner a = new Scanner (System.in);
System.out.println("How many movies were rented?");
int rented = a.nextInt();
Scanner b = new Scanner (System.in);
System.out.println("How many members were refered?");
int referred = b.nextInt();
int discount = Math.min(rented+ referred, 75);
System.out.print("The total discount is " + discount + " percent");
}
}
import java.util.Scanner;
public class Discount_Calculator {
public Discount_Calculator() {
// TODO Auto-generated constructor stub
}
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner in1 = new Scanner (System.in);
System.out.print("How many movies did the customer rent: ");
int rented_movies = in1.nextInt();
System.out.println("");
Scanner in2 = new Scanner (System.in);
System.out.print("How many customers did they refer: ");
int customers_refered = in2.nextInt();
int discount = Math.min(customers_refered + rented_movies, 75);
System.out.println("Discount is " + discount + "%");
}
}