which land. this is an international site
southeast
find third highest salary in a table
Aaron Finch 156
It is 32767 for data-type int, 65535 for unsigned int.
yes it will be, it is the highest peak in Greece and the highest peak in Europe not int he Alps.
In C#: int[] list = new int[] { 1 , 2, 3, 4}; int highest = int.MinValue; foreach(int i in list) { if(i > highest) { highest = i; } } Console.WriteLine(highest.ToString() + " is the highest number");
a peninsula
The simplest way is usually to iterate through an array using a loop and store either the index or the value of the highest number you find. For example: int findLargestIndex(int *array, int arraysize) { int largestIndex = 0; for(int i = 0; i < arraysize; i++) { if(array[i] > array[largestIndex]) largestIndex = i; } return largestIndex; }
The King Ranch in Texas.
#include <iostream> using std::cout; using std::cin; using std::endl; void input(double arr[], const int arr_size); double max(double arr[], const int arr_size); int main() { const int arr_size = 5; double arr[arr_size] = {0.0}; input(arr, arr_size); cout << "Highest number is: " << max(arr, arr_size) << endl; system("PAUSE"); return 0; } void input(double arr[], const int arr_size) { cout << "Enter " << arr_size << " elements to find the highest:" << endl; for (int i = 0; i < arr_size; i++) { cout << (i + 1) << " element is: "; cin >> arr[i]; } } double max(double arr[], const int arr_size) { double highest_num = arr[0]; for (int i = 0; i < arr_size; i++) { if (highest_num < arr[i]) { highest_num = arr[i]; } } return highest_num; }
Here it is in Java for 5 numbers: (adapt for your programming language) import java.util.Arrays Public class Highestnumber { public static void main (String args[]) { Scanner input = new Scanner( System.in ); int numberofinputs = 5; //make an array to hold the numbers int numbers[] = new Int[numberofinputs]; for (x=0;x<numberofinputs;x++) { System.out.print("Please input a number: "; numbers[x] = input.nextInt(); } //Sorts Numbers from least to greatest Arrays.sort(numbers[]); //gets highest number int highestnum = numbers[numberofinputs-1] //displays highest number System.out.println("The highest number is:" + highestnum); } }
recognition