+ 1
Write a simple program in java to print the count of divisors
2 Antworten
+ 11
0) int counter=0;
1) run a loop from d=1 to d=numberEntered
2) if numberEntered%d==0 , increase counter by 1
3)print counter after the loop
//I have 1 more idea of doing that using simple math i.e, print product of (power+1) of prime in which number can be expressed
+ 3
Post the code that you've written so far to try and accomplish that. I'll be more than happy to help you figure out what you're doing wrong.
https://www.sololearn.com/Codes/
^You can post your code in there and link us to it.