1 2 3 4 5 6 7 | // incomplete illustration relative to print_integer(…)
unsigned int n_abs = n;
if(n < 0) {
n_abs = -n;
}
assert(n_abs >= 0); // moot because n_abs is an unsigned int, but this illustrates documenting an expectation
|
© Copyright 2022 Alexander J. Quinn This content is protected and may not be shared, uploaded, or distributed.