Created
March 7, 2023 07:28
-
-
Save iarash84/a0d154a49fefe51d75edb634533cffb0 to your computer and use it in GitHub Desktop.
simple template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template<typename T> | |
T findMax(T arr[], int size) { | |
T max = arr[0]; | |
for (int i = 1; i < size; i++) { | |
if (arr[i] > max) { | |
max = arr[i]; | |
} | |
} | |
return max; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment