style: remove interaction with the user (#3006)

Helps with #2753

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
This commit is contained in:
Piotr Idzik
2025-09-27 06:56:46 +02:00
committed by GitHub
parent 8541bb3674
commit 643e0a96e0

View File

@@ -23,7 +23,6 @@
**/
#include <cassert>
#include <iostream>
/**
* Function to compute the number of positive divisors.
@@ -80,13 +79,5 @@ void tests() {
*/
int main() {
tests();
int n;
std::cin >> n;
if (n == 0) {
std::cout << "All non-zero numbers are divisors of 0 !" << std::endl;
} else {
std::cout << "Number of positive divisors is : ";
std::cout << number_of_positive_divisors(n) << std::endl;
}
return 0;
}