From 583264da0f721cbeb6d8a8a1ea18e74e955708b9 Mon Sep 17 00:00:00 2001 From: Mann Mehta <44433995+mann2108@users.noreply.github.com> Date: Wed, 15 Apr 2020 09:14:50 +0530 Subject: [PATCH] Resolve errors --- math/number_of_positive_divisors.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/math/number_of_positive_divisors.cpp b/math/number_of_positive_divisors.cpp index 5bf1e717a..461c0ca82 100644 --- a/math/number_of_positive_divisors.cpp +++ b/math/number_of_positive_divisors.cpp @@ -28,7 +28,7 @@ int number_of_positive_divisors(int n) { prime_exponent_count.push_back(prime_count); } } - if(n > 1) { + if (n > 1) { prime_exponent_count.push_back(1); } @@ -44,12 +44,13 @@ int number_of_positive_divisors(int n) { int main() { int n; std::cin >> n; - if(n < 0) { + if (n < 0) { n = -n; } - if(n == 0) { + if (n == 0) { std::cout << "All non-zero numbers are divisors of 0 !" << std::endl; } else { - std::cout << "Number of positive divisors is : " << number_of_positive_divisors(n) << std::endl; + std::cout << "Number of positive divisors is : "; + std::cout << number_of_positive_divisors(n) << std::endl; } }