Untitled diff

Created Diff never expires
8 removals
Lines
Total
Removed
Words
Total
Removed
To continue using this feature, upgrade to
Diffchecker logo
Diffchecker Pro
11 lines
1 addition
Lines
Total
Added
Words
Total
Added
To continue using this feature, upgrade to
Diffchecker logo
Diffchecker Pro
6 lines
int maxValue = ABS(x[0]);
int maxValue = ABS(x[0]);
if (n > 1) {
for (i = 1; i < n; i++) {
for (i = 1; i < n; i++) {
maxValue = MAX(maxValue, ABS(x[i]);
int currentValue = ABS(x[i])
if (currentValue > maxValue) {
maxValue = currentValue;
}
}
}
}
return maxValue;
return maxValue;