From e9786417e1e2893cb6a6a37ef27b711f1942ff86 Mon Sep 17 00:00:00 2001 From: CarlosZoft <62192072+CarlosZoft@users.noreply.github.com> Date: Tue, 15 Feb 2022 14:57:32 -0300 Subject: [PATCH] fix: remove namespace std like default --- math/modular_inverse_simple.cpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/math/modular_inverse_simple.cpp b/math/modular_inverse_simple.cpp index ba399549b..dd2b4bc65 100644 --- a/math/modular_inverse_simple.cpp +++ b/math/modular_inverse_simple.cpp @@ -13,8 +13,6 @@ #include #include -using namespace std; - /** * @brief Function imod * Responsible for calculating the modular inverse from x % y @@ -39,23 +37,22 @@ int imod(int x, int y) { * @returns void */ static void test() { - cout << "First case testing... \n"; + std::cout << "First case testing... \n"; // for a = 3 and b = 11 return 4 - cout << imod(3, 11) << endl; assert(imod(3, 11) == 4); - cout << "\nPassed!\n"; + std::cout << "\nPassed!\n"; - cout << "Second case testing... \n"; + std::cout << "Second case testing... \n"; // for a = 3 and b = 26 return 9 assert(imod(3, 26) == 9); - cout << "\nPassed!\n"; + std::cout << "\nPassed!\n"; - cout << "Third case testing... \n"; + std::cout << "Third case testing... \n"; // for a = 7 and b = 26 return 15 assert(imod(7, 26) == 15); - cout << "\nPassed!\n"; + std::cout << "\nPassed!\n"; - cout << "\nAll test cases have successfully passed!\n"; + std::cout << "\nAll test cases have successfully passed!\n"; } /** * @brief Main function