Question: oks My library > IFT 2 1 0 : Introduction to Java Technologies home > 3 . 7 : Detecting multiple features with branches 5

oks My library > IFT 210: Introduction to Java Technologies home >3.7: Detecting multiple features with branches
528040.3489528.qx3zqy7
zyBooks catalog
Help/FAQ
Jump to level 1
Given integers numPoints 1 and numPoints2, output "numPoints 1 is positive." if numPoints 1 is greater than 0. End with a newline. Assign numPoints 2 with 6 if numPoints 2 is greater than 10. Otherwise, output "numPoints2 is less than or equal to 10." End with a newline.
Ex: If the input is 55-10, then the output is:
numpoints1 is positive.
numPoints2 is less than or equal to 10.
numPoints2 is -10.
import java.util.Scanner;
public class Number Conditions {
public static void main (String[] args){
Scanner scnr = new Scanner(
System.in);
int numpoints1;
int numPoints2;
numPoints1= scnr. nextInt();
numpoints 2 scnr. nextInt () ;
V* Your code goes here */
System.out.println("numPoints2 is "+ numPoints 2+.);
}
1
2
3
 oks My library > IFT 210: Introduction to Java Technologies home

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!