Read the if program segment given below:
if (a > b)
z = 25;
else
z = 35;Which one of the following is the correct conversion of the if segment to ternary?
Rewrite the following program segment using a for loop:
Given program segment:
int a = 5, b = 10;
while (b > 0)
{
b -= 2;
}
System.out.println(a * b);
Note: Ensure that the variable $b$ remains accessible for the System.out.println statement after the loop terminates.
Give the output of the following program segment and mention how many times the loop is executed.
int K = 1;
do
{
K += 2;
System.out.println(K);
} while (K <= 6);
नीचे दिए गए चित्र को ध्यान से देखिए और चित्र को आधार बनाकर कोई लेख, घटना अथवा कहानी लिखिए जिसका सीधा व स्पष्ट संबंध चित्र से होना चाहिए। 