You are not allowed to use the concepts, such as looping or functions, that we have not studied.
Hint: the easiest way to code program is to incorporate || (logical-or) operation in the expression of the branching statements.
That is, the outline of your program could be as follows:
if the order is increasing AND x is greater than y OR the order is decreasing AND x is less than y then swap x and y if the order is increasing AND y is greater than z OR the order is decreasing AND y is less than z then swap y and z if the order is increasing AND x is greater than y OR the oreder is decreasign AND x is less than y then swap x and y again
You may assume that the user never inputs a number less than 1 or greater than 35.
You are not allowed to use the concepts, such as looping or functions, that we have not studied. Writing a program that treats all 35 cases separately (that is, has 35 separate output statements) will result in a bad grade.
Hint: Use integer division to extract singles and tens out of the input number of days. See this program for an example. Then use switch and if statements. Specifically, you will need to differentiate (with an if) the number days that is less than 20. For such numbers you will need a switch statement to print the whole value. For the number of days larger than 20, you will need one switch to print the word for the first digit, and another -- the word for the second digit.
That is, the outline of your program could be as follows:
if(number of tens is equal to 1) switch that differentiates singles and prints "ten", "eleven", or ... else switch or if that differentiates tens and prints "twenty" or "thirty" note that this switch should ignore the case (print nothing) if the number of tens is zero after that switch that differentiates singles and prints "one" or "two", or ... note that this switch should also ignore the case of zeroThe number manipulation is very similar to this switch example we studied in class.
Milestone: implement part 1 (Order) of the assignment.
Make sure you program adheres to proper programming style. Submit your project to the subversion repository. Do not forget to verify your submission on the web.