Give output of the following function definition and also write the mathematical operation they carry out:
void test1(int n)
{
for(int x=1; x<=n; x++)
if(n%x == 0)
System. out.println(x);
}
if 12 is passed to n.
Answers
Answered by
1
Answer:
oid test1(int n)
{
for(int x=1; x<=n; x++)
if(n%x == 0)
System. out.println(x);
}
Explanation:
Similar questions