+ 1
how to Rearrange the code to find and print the smallest element of the array
2 Antworten
+ 9
1. Assign arr[0] as a minimum
2. Traverse through the whole array
3. If an element is less than the current minimum, then make that element the minimum
min=arr[0];
for(int i=0;i<arr.length;i++)
{
if(arr[i]<min)
min=arr[i]
}
cout<<min<<endl;
0
how print the i love you word in c++