0
explain output
can somebody explain why this outputs as 12?: int f=1, i=2; while(++i<5) { f*=i; } cout<<f; thanks!
3 Réponses
+ 3
Yes, you're right ;)
0
ah i think i understand now, but please feel free to correct me if this reasoning is wrong
i increments to 3
3*1 = 3
i increments to 4
3*4 = 12
and then it terminates bc i would no longer be <5
- 2
दिए गए कोड टुकड़े का आउटपुट क्या है
int f=1, i=2;
while(++i<5)
f*=i;
cout<<f;