Napište kód pro nalezení největšího čísla v poli.

```python
def find_largest_number(arr):
    largest = arr[0]
    for num in arr:
        if num > largest:
            largest = num
    return largest

# Example usage
array = [3, 7, 2, 9, 5]
largest_number = find_largest_number(array)
print("The largest number is:", largest_number)
```
[1, 5, 7, 18, 24, 32]
int largestNum = 0;
foreach(int num in array)
{
    if (num > largestNum)
    {
        largestNum = num;
    }
}

Console.WriteLine("Největší číslo v poli je " + largestNum);