Respuesta :
Answer:
Explanation:
Modified code:
import java.util.Scanner;
public class EqualityAndRelational {
public static void main (String args) args) {
int userStreak;
int userPoints;
userPoints = 0;
Scanner scnrnew Scanner(System.in);
userStreak = scnr.nextInt();
if (userStreak <= 25) {
userPoints = 10;
} else {
userPoints = 0;
}
}
}
Following are the code to the given question:
Program Explanation:
- Import package.
- Defining a class EqualityAndRelational.
- Defining the main method, inside the method two integers "userBonus, userPoints" variable is declared.
- In the next step, a scanner class object is created that inputs value into the "userBonus" variable.
- After input value, a conditional statement has used that checks the input value which is less than equal to 20, if it true it adds 10 in the "userPoints" variable.
- Otherwise, it will go to the else block in which it adds 0 into the "userPoints" variable.
Program:
Please find the attached file.
Output:
Please find the attached file.
Learn more:
brainly.com/question/12941338

