mirror of
https://github.com/TheAlgorithms/C
synced 2024-11-22 13:31:21 +03:00
Merge pull request #192 from Manoj7117/patch-1
number invalid if number >= base
This commit is contained in:
commit
2fde23c6ed
@ -25,8 +25,10 @@ int main(void) {
|
||||
else
|
||||
number[i] = base + 1;
|
||||
|
||||
if (number[i] > base)
|
||||
if (number[i] >= base){
|
||||
printf("invalid number\n");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
for (j = 0; j < i; j++) {
|
||||
|
Loading…
Reference in New Issue
Block a user