Computer Science, asked by itzcutegirl87, 10 hours ago

Solve it !
Plz
Don't spam
I want correct answer and if u know then only solve it

Attachments:

Answers

Answered by Oreki
2

\textbf{\large Given Snippet}

    \texttt{int a = 10;}\\\texttt{for (int i = 1; i <= 5; i++) \{}\\\texttt{\hspace{1.5em} System.out.print(i + a + 1);}\\\texttt{\hspace{1.5em} if (i \% 2 == 0 \&\& a \% 2 == 0)}\\\texttt{\hspace{3em} break;}\\\texttt{\}}

\textbf{\large Ou\symbol{116}put}

    \textsf{\textbf{Dry Run}}

         \textsf{Iteration - 1}

              \texttt{print - (1 + 10 + 1) : \boxed{12}}

              \texttt{1 \% 2 == 0 \&\& 10 \% 2 == 0}\\\textsl{\hspace{1.3em} false \hspace{1.5em} \&\& \hspace{1.5em} true}\\\textsf{\hspace{5.2em} \textbf{false} - \textit{stays in the lo\symbol{111}p.}}

         \textsf{Iteration - 2}

              \texttt{print - (2 + 10 + 1) : \boxed{13}}

              \texttt{2 \% 2 == 0 \&\& 10 \% 2 == 0}\\\textsl{\hspace{1.3em} true \hspace{1.5em} \&\& \hspace{1.5em} true}\\\textsf{\hspace{5.2em} \textbf{true} - \textit{comes out of the lo\symbol{111}p.}}

     \textsf{\textbf{Final ou\symbol{116}put}}

         \boxed{1213}

Answered by itzMayankPandey
0

Answer:

Hey wassup

Mayank here :D

MKP BEEHIVE wala xD

Explanation:

Similar questions