2. for(j=2;j<=20;j=j+2)
{
if (j==10)
break;
System.out.println(" " +j);
}
Answers
Answered by
6
Answer:
2
4
6
8
Explanation:
It's easy just you have to know the use of break . It actually breaks the statement into two parts ,
- First part are the values at which ,we the values get printed
- Second part are the values at which, the statement of loop feels a termination and breaks making no output and execution at all
This is working of break and this how above statement worked well you do not have to give space in "println" as I know you had to print the output as ,
2 4 6 8... which can only be obtained by "print"
Answered by
5
Answer:
it's easy just you have to know the use of break. it actually breaks the into two parts
Explanation:
hope it's help you buddy
Attachments:
Similar questions