for( int i =1 ; i <= 5 ; i++) { if ( i % 2 == 0) Sop(i*i + “\t”); else Sop(i+3 +”\t”); }
tell output
Answers
Answered by
1
Answer:
4 4 6 16 8
Explanation:
In starting of loop, the value of i is 1 hence, in if condition is checked and it returns false because i%2 is not equals to 0. Hence else part is exectued and it prints 4 with a tab. Loop is repeated until i <= 5.
Similar questions