Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DB2 11 The Ultimate Database For Cloud Analytics And Mobile

Authors: John Campbell, Chris Crone, Gareth Jones, Surekha Parekh, Jay Yothers

1st Edition

ISBN: 1583474013, 978-1583474013

More Books

Students also viewed these Databases questions

Question

Discuss the steps used in strategic planning.

Answered: 1 week ago

Question

define EFFECTIVE PARTICIPATION

Answered: 1 week ago