Last active
February 10, 2018 22:30
-
-
Save growlnx/821aac9a30be92ff76ad53aa951f2977 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| #include "iostream" | |
| #include "vector" | |
| using namespace std; | |
| double max(vector<double> vetor){ | |
| double maior= fila[0]; | |
| for(short i = 1; i < fila.size(); i++){ | |
| if(fila[i] > maior) | |
| maior = fila[i]; | |
| } | |
| return maior; | |
| } | |
| int main(void){ | |
| vector<double> fila = {1.8, 1.7, 1.6, 1.88, 1.9}; | |
| cout << max(fila) << endl; | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment