Untitled document
Untitled document
Input:
numbers = {1.2f, 2.5f, 3.1f, 4.0f, 5.7f};
Expected Output:
Sum = 16.5
Expected Output:
30 is present in the array.
Expected Output:
Average marks = 83.4
Expected Output:
8 10 12
14 16 18
Expected Output:
Reversed array: 5 4 3 2 1
Expected Output:
Maximum element: 90
Expected Output:
Minimum element: 12
8. Write a Java program to find whether an array is
sorted or not.
Input:
arr = {1, 2, 3, 4, 5};
Expected Output:
Array is sorted.