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.

4.

Write a program to store temperature of two different cities for a week and display it.

Enter all temperature for a week of first city and then second city. 
5.

Write a program to accept five integer values from keyword. The five values will be stored in an array using a pointer. Print the elements of the array in reverse order using a pointer.

Example :

Input : array = 2, 4, -6, 5, 8, -1
Output : reverse_array = -1, 8, 5, -6, 4, 2