answersLogoWhite

0


Best Answer

public int min(int[] arr)

{

int min = Integer.MAX_VALUE;

for(int e : arr) if(e<min) min=e;

return min;

}

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a java programme to find minimum number in the given array?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

C program to copy one matrix to another matrix?

#include main() { int array[100], minimum, size, c, location = 1; printf("Enter the number of elements in array\n"); scanf("%d",&size); printf("Enter %d integers\n", size); for ( c = 0 ; c < size ; c++ ) scanf("%d", &array[c]); minimum = array[0]; for ( c = 1 ; c < size ; c++ ) { if ( array[c] < minimum ) { minimum = array[c]; location = c+1; } } printf("Minimum element is present at location number %d and it's value is %d.\n", location, minimum); return 0; }


The minimum number of comparisons requied to find the second smallest element in a 1000 element array is?

1010


How do you write the 8051 micro controller alp for finding the largest number in an array?

1


How to write a program to store ten elements to an array and display the smallest element using C programming?

You data has to be stored in the array arr[] of size 10.double min(const arr[], int arrSize){double minimum = arr[0];for (int j = 0; j < arrSize; j++){if (minimum > arr[j]){minimum = arr[j];}}return minimum;}


You want to write a simple without using pointer or array c program which will print greatest number when you give 20 number?

i want to write a simple without using pointer or array c program which will print greatest number when i give 20 number .........How far have you gotten so far?


What a division sentence modeled by an array that has 2 more rows than the number in each row?

write a division sentence modeled by an array that has 2 more rows than the number in each row


What is squre array?

A square array is an array in which the number of rows is the same as the number of columns.


PHP program to find the minimum number among a list?


How 2 write c code of array data structure?

An example: int array [10]; yaaa this is write but for a simple programs on array and all data structure visit codingdatastructure.blogspot.com


How do you write a programme in c language using arrays to store a ten integer data and find the second smallest and second largest elements in the array?

void mail ( ); { int a, b c = a+b; printf ("%d",=c); }


How to find max and min values?

Find the minimum and maximum of what? An array?


Would you Write c plus plus program using array for Fibonacci number?

You can write a C++ fib pro using arrays but the problem is the prog becomes very complicated since u need to pass the next adding value in an array.....