Computer Science, asked by kshitijcloudline, 6 months ago

Predict the Output of the following Programs

Question 1

class Q1

{​​

public static void main(String args[])

{​​

int i;

for(i = -1;i<10;i++)

{​​

System.out.println(++i);

}​​

}​​

}​​

Question 2

class Q2

{​​

public static void main(String args[])

{​​

int i=2,k=1;

while (++i<6)

k *= i;

System.out.println(k);

}​​

}​​

Answers

Answered by yesiamin6
3

Answer:

Q1 ans = 0,2,4,6,8,10

Q2 ans =60

Explanation:

HOPE IT HELPS YOU

DO FOLLOW FOR MORE ANSWERS

MARK AS BRAINLIEST

Similar questions