|
|
|
|
|
by ant512
4560 days ago
|
|
I'd suggest that, if a variable with an undefined value is a valid state for the program, the declaration is in the wrong place. How about this alternative? int dec(int a, int condition) {
if (condition) {
int temp = 0;
//compute something here in a loop
while (temp < a) {
a -= (temp++);
}
}
return a;
}
|
|