WAP to check if all the elements of a tuple are in descending order or not.
Answers
Answered by
0
//use this to only find if a number is in descending order ..if u want to check for another purpose use bubble sort algorithm.
int arr[] = new int{4,2,5};
for (int i= 0; i<arr.length;i++){
if(arr[i]<arr[j]{
sout("not in descending order");
break;
}
Similar questions