You are viewing a single comment's thread. Return to all comments →
int max_of_four(int a, int b, int c, int d){ int values[] = {a,b,c,d}; int largest=a; for (int i: values){ if (largest<i){ largest=i; } i++; } return largest; }
Seems like cookies are disabled on this browser, please enable them to open this website
Functions
You are viewing a single comment's thread. Return to all comments →
Using ranged for loop