68 758
Assignments Done
Successfully Done
In January 2019

Answer to Question #57820 in Java | JSP | JSF for Nithya

Question #57820
Write a program that asks the user to input an integer, n, and finds and print the largest number divisible by n that is made from the product of two 3-‐‐digit numbers.
Expert's answer
public static void main(String[] args){
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
int res = 0;
for(int i = 0; i<1000000; i++){
for(int j = 100; j<1000; j++){
if(i%j == 0 && ((i/j)>=100 && (i/j)<1000)){
res = 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!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions