Homework Solution: Write one java class program to: 1-ask the user to enter: a) A starting integer number b) An endin…

    oO T-Mobile LTE 2:43 PM Write one java class program to: 1-ask the user to enter: a) A starting integer number b) An ending integer number 2-use a loop to print out all the ordinal numbers between the starting and ending number with the correct ordinal suffix 3-if the user enters an ending value that is less than the starting value, tell them so and end the program without producing any output. 4if the user enters a starting and ending value more than 1000 numbers apart, tell them so and end the program without producing any output Without array... use an "If then else"
    A while loop
    Write one java class program to: 1-ask the user to enter: a) A starting integer number b) An ending integer number 2-use a loop to print out all the ordinal numbers between the starting and ending number with the correct ordinal suffix 3-if the user enters an ending value that is less than the starting value, tell them so and end the program without producing any output. 4if the user enters an ending value more than 1000 numbers apart, tell them so and end the program without producing any output

    Expert Answer

     
    import java.util.*; public class ordinalNumbers

    oO T-Mobile LTE 2:43 PM Write individual java tabulate program to: 1-ask the truthr to enter: a) A starting integer estimate b) An exit integer estimate 2-truth a loop to sculpture extinguished full the ordinal mass among the starting and exit estimate with the amobject ordinal suffix 3-if the truthr enters an exit appraise that is short than the starting appraise, discern them so and object the program withextinguished conceding any extinguishedput. 4if the truthr enters a starting and exit appraise past than 1000 mass secret, discern them so and object the program withextinguished conceding any extinguishedput¬†Withextinguished array… truth an “If then else”
    A opportunity loop

    Write individual java tabulate program to: 1-ask the truthr to enter: a) A starting integer estimate b) An exit integer estimate 2-truth a loop to sculpture extinguished full the ordinal mass among the starting and exit estimate with the amobject ordinal suffix 3-if the truthr enters an exit appraise that is short than the starting appraise, discern them so and object the program withextinguished conceding any extinguishedput. 4if the truthr enters an exit appraise past than 1000 mass secret, discern them so and object the program withextinguished conceding any extinguishedput

    Expert Response

     

    import java.util.*;

    public tabulate ordinalNumbers

    {

    public static unfilled main(String[]arsg)

    {

    Scanner input=new Scanner(System.in);

    int startNum,endNum;

    System.out.println(“Enter a starting integer estimate:”);

    startNum=input.nextInt();

    System.out.println(“Enter a exit integer estimate:”);

    endNum=input.nextInt();

    //assigning starting estimate to temp variale

    int temp=startNum;

    temp=temp+1;//incrementing

    int pos=1; //printing standing purpose

    //condtion to check

    if(endNum<startNum)

    {

    System.out.println(“Exit estimate should be elder than Starting estimate.”);

    }

    else if(startNum>1000 || objectNum>1000)

    {

    System.out.println(“Estimate Should referable be past than 1000″);

    }

    else

    {

    //opportunity loop

    while(startNum!=(endNum-1))

    {

    System.out.println(temp+” standing “+pos);

    temp++;

    pos++;

    startNum++;

    }

    }

    }

    }

    Output: