The Day Dreamer
Senior member
#Homework
void test (int n)
{
for(int i=1;i<=n);i++)
if(n%i==0)
System.out,println(i)
If an integer 24 is passed to n.
Can you show the dry working please. I am getting confused that integer i will become 1 again because of for condition. No idea if right or wrong. Please help. Thanks 🙂
void test (int n)
{
for(int i=1;i<=n);i++)
if(n%i==0)
System.out,println(i)
If an integer 24 is passed to n.
Can you show the dry working please. I am getting confused that integer i will become 1 again because of for condition. No idea if right or wrong. Please help. Thanks 🙂
Last edited: