Assume that the vector v exists Use a for loop to find the l
Assume that the vector v exists. Use a for loop to find the largest element in v and store the result in the variable r
Solution
Answer:
int r= 0;
for(int i=0; i<v.size(); i++){
if(r< v[i]){
r= v[i];
}
}
cout<<\"Largest element in v is \"<<r<<endl;

