60 316
Assignments Done
98%
Successfully Done
In April 2018

Answer to Question #17131 in Java | JSP | JSF for Sayed Abdullah Almousawi

Question #17131
Write a Java application that prints the numbers between LOW and HIGH that are evenly divisible by four but not by five.
Expert's answer
import java.util.Scanner;




public class Test {

public static void main(String[] args) {

Scanner console = new Scanner(System.in);

System.out.println("Enter LOW range");

String temp = console.next();

int low = Integer.parseInt(temp);

System.out.println("Enter HIGH range");

temp = console.next();

int high = Integer.parseInt(temp);




for (int i = low; i < high; i++) {

if (i % 4 == 0 && i % 5 != 0) {

System.out.print(i + " ");

}

}

}

}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions