MCQ Single Best Answer Easy

QWhat will be the output of the program?

class MCQ
{
	public static void main(String args[])
	{
		MCQ mcq = new MCQ();
		mcq.test(12);
	}

	void test(int n){

		for (int x = 1; x <= n; x++)
		if(n%x == 0)
			System.out.print(x+" ");
	}
}

ID: #22358 মনোবিজ্ঞান কী? 102 views
Question Info
#22358Q ID
EasyDifficulty
মনোবিজ্ঞান কী?Topic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A 1 2 3 4 6 12
  • B 1 2 3 4 5 6 12
  • C 1 2 3 4 6 7 12
  • D 1 2 3 4 6 12 14
Correct Answer: Option A

Explanation

1 2 3 4 6 12

Share This Question

Challenge a friend or share with your study group.