Question: please write a program on netbeans using java language thank you Problem #2: (20 pts Write a program that prompts the user to enter an

please write a program on netbeans using java language thank you please write a program on netbeans using java language thank you Problem

Problem #2: (20 pts Write a program that prompts the user to enter an integer X, then displays the product of the even digits in X. The program terminates if the digit 0 is found and displays the current product value. The extraction of digits occurs from right to left. Sample run 1: Enter an integer: 872319 The product of the even digits is 16 // Hint: the digits are 2*8 = 16 Sample run 2: Enter an integer: 540312 Zero is found The product of the digits is 2 //Hint: Only 2 is found, the program stops because the 4th digit is zero Sample run 3: Enter an integer: 4126 The product of the digits is 48 //Hint: the digits are 6*2*4 = 48 Sample run 4: Enter an integer: 41026 Zero is found The product of the digits is 12 //Hint: Only 6 and 2 are found, the program stops because the 3 digit is zero

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!