mirror of
https://hub.njuu.cf/TheAlgorithms/C-Plus-Plus.git
synced 2023-10-11 13:05:55 +08:00
fix absolute value
This commit is contained in:
parent
7ae91d2607
commit
e45a37763d
@ -135,7 +135,7 @@ int main() {
|
|||||||
std::cout << "Enter element to add = ";
|
std::cout << "Enter element to add = ";
|
||||||
std::cin >> x;
|
std::cin >> x;
|
||||||
h = mychain.hash(x);
|
h = mychain.hash(x);
|
||||||
h = std::fabs(h);
|
h = std::abs(h);
|
||||||
mychain.add(x, h);
|
mychain.add(x, h);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
|
Loading…
Reference in New Issue
Block a user