1 import java.util.Scanner; 3 public class EqualityAndRelational { 4 public static void main (String args) args) { int userBonus; int userPoints; userPoints-0; Scanner scnrnew Scanner(System.in); 7 10 userBonus = scnr.nextInt(); // Program will be tested with values : 15, 20, 25, 30, 35. 12 13 14 15 16 17 18 19 * Your solution goes here userPoints-10 else userPoints = 0;

Respuesta :

Missing Part of the Question

Complete the expression so that userPoints is assigned with 0 if userBonus is greater than 20 (second branch). Otherwise, userPoints is assigned with 10 (first branch

import java.util.Scanner;

public class EqualityAndRelational {

public static void main (String args) args) {

int userBonus; int userPoints;

userPoints=0;

Scanner scnr = new Scanner(System.in);

userBonus = scnr.nextInt();

// Program will be tested with values : 15, 20, 25, 30, 35. 12 13 14 15 16 17 18 19

( Your solution goes here)

{

userPoints= 10 ;

}

else {

userPoints = 0;

}

}

}

Answer;

Replace

( Your solution goes here)

With

if(userBonus>20).

The full program becomes

import java.util.Scanner;

public class EqualityAndRelational {

public static void main (String args) args) {

int userBonus; int userPoints;

userPoints=0;

Scanner scnr = new Scanner(System.in);

userBonus = scnr.nextInt();

// Program will be tested with values : 15, 20, 25, 30, 35. 12 13 14 15 16 17 18 19

if(userBonus>20)

{

userPoints= 10 ;

}

else {

userPoints = 0;

}

}

}