Horje
find largest number in vector c++ Code Example
find largest number in vector c++
#include <algorithm> // max_element
#include <vector> 
#include <iostream> // cout 
using namespace std;
int main(){
  vector<int> v1{ 10, 20, 30, 40, 50, 25, 15 };
  cout << *max_element(v1.begin(), v1.end());
}




Cpp

Related
lpcwstr to string c++ Code Example lpcwstr to string c++ Code Example
‘setprecision’ was not declared in this scope Code Example ‘setprecision’ was not declared in this scope Code Example
remove or erase first and last character of string c++ Code Example remove or erase first and last character of string c++ Code Example
c++ estimate deciimal to a point Code Example c++ estimate deciimal to a point Code Example
jupyter lab use conda environment Code Example jupyter lab use conda environment Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8