1, 2 and 7
1, 3 and 6
1, 4 and 5
2, 3 and 5
Output related how can i get output in this form
hey @missroy You can print this in if condition where you are checking like , if(ar[i]+ar[j] == target){
System.out.println(ar[i]+" and "+ar[j]);
}
this line will print the required output.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.