Question: (Write program in JAVA) 1. Assume that an integer variable called zip contains a 5-digit integer representing a zip code in the eastern part of

(Write program in JAVA)

1. Assume that an integer variable called zip contains a 5-digit integer representing a zip code in the eastern part of the country. Write Java statements and the variable declarations needed to extract the middle digit out of the zip. The output should read: The middle digit of xxyxx is y (where y is the integer in zip and y is the middle digit of that integer). Thus, if zip were 12345, then the output would be The middle digit of 12345 is 3.

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!