Question: Write a program named OddPredecessor that reads a positive integer and prints out the largest odd number that is less than the number that was

Write a program named OddPredecessor that reads a positive integer and prints out the largest odd number that is less than the number that was read in.(So, if it reads 98, it will print 97; if it reads 141, it will print 139.) Please do this Java code without useing methods just simple and barebones java also not useing loops.
Write a program named OddPredecessor that reads a

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 Programming Questions!