Question: Help with this question. Modify the program to print 1st, 2nd, 3rd, 4th and 5th rather than 1th, 2th, etc., without introducing redundant statements (Hint:
Help with this question.
Modify the program to print "1st", "2nd", "3rd", "4th" and "5th" rather than "1th", "2th", etc., without introducing redundant statements (Hint: Precede the "if-else" statement with[i] a separate if-else statement that determines the appropriate ending based on the number).

2 import java.util.ArrayList; 3 import java.util.Scanner; 4 5 public class MostPopularOS public static void main (String [] args) Scanner scnr new Scanner (System.in) ArrayList
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
