Answers for "if statement to compare between multi data"

C#
0

if statement to compare between multi data

int maxOfFive (int a, int b, int c, int d, int e) {
    int largest = a;
    if (b > largest) largest = b;
    if (c > largest) largest = c;
    if (d > largest) largest = d;
    if (e > largest) largest = e;
    return largest;
}
Posted by: Guest on November-10-2020

Code answers related to "if statement to compare between multi data"

C# Answers by Framework

Browse Popular Code Answers by Language