Computer Science, asked by tirumalaveeramalli25, 8 months ago

write a FOR LOOP to print the even numbers from 1 to 50 in reverse order label the control variable initial value step and body of loop​

Answers

Answered by Anonymous
11

\huge\bf\red{\underline{\underline{TO\: CALCULATE}}}\\\\

\textbf{A For Loop with control variable, value}

\textbf{from 1 to 50 in reverse order (i.e. 50 to 1)}

\\\\

\huge\bf\mathfrak\pink{\underline{\underline{Answer}}}\\\\

for({{control\:variable}\atop{\overbrace{i}}} ={{initial\:value}\atop{\overbrace{50}}};{{condition}\atop{\overbrace{i>=1}}};{{update\: expression}\atop{\overbrace{i++}}})

{

{{Body\:of\:the\:loop}\atop{\overbrace{System.out.println(i);}}}

}

\huge\mathbb{\red{\underline{\underline{Explanation}}}}\\\\

\huge\mathbb{\underline{CONTROL\:VARIABLE}}\\

\textbf{A variable that controls the loop}

\textbf{is known as the control variable.}\\\\

\huge\mathbb{\underline{INITIAL\:VALUE}}\\

\textbf{The initial value is the starting}

\textbf{value of a variable in general}

\textbf{and starting value of a control}

\textbf{variable in a loop in particular}\\\\

\huge\mathbb{\underline{BODY\:OF\:THE\:LOOP}}\\

\textbf{Body of the loop is the part of}

\textbf{the loop within the curly braces.}\\

\huge\mathcal\green{ Stay \:Home \:And \:Stay\:Safe}

\huge\boxed{\mathbb\pink{\underline{\underline{Thanks}}}}

\huge\mathcal\red{\underline{\underline{BE\:BRAINLY}}}

▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬

Similar questions