1.

Write a program which inputs three numbers and outputs the message Sorted if the numbers are in ascending order, and outputs Not sorted otherwise. (Hint: Use Conditional Operator).

A sample output is shown below:
 

Input three numbers:

4

5

3

Not sorted

2.

Write a program which inputs a person’s height (in centimeters) and weight (in kilograms) and outputs one of the messages: underweight, normal, or overweight, using the criteria:

  • Underweight: weight < height/2.5
  • Normal: height/2.5 <= weight <= height/2.3
  • Overweight: height/2.3 < weight
3.

Write a program which inputs a date in the format dd/mm/yy and outputs it in the format month dd, year.
For example, 25/12/61 becomes December 25, 1961.