Predict the output of the following code:
int n=4,f=0,i;
for(i=1;i<=n;i++)
{
f=f*i;
}
jTextField1.setText(""+f);
jTextField2.setText(""+i);
please just dont give the answer,Explain it to me because my answer is (0 and 4)
Answers
Answered by
0
Answer:
04tytyyio turn gunny di th di th to to to yo fu ru tu turn t fu rttuo
Answered by
0
First i becomes 1 then the condition becomes true as i (1) is less than n(4) so next command where i=4 then f=f(0)*i(4) that is f=0 now output is 0 and 4 !!!
Similar questions