0

Number pattern

https://code.sololearn.com/czm7p7Xg4VCE/#c Explain me the flow friends.. what mistake I have done why the 7 is being printed after printing the numbers 7 14 21 14 7 7 7

15th Sep 2018, 1:34 PM
Dhiviya Thirumavalavan
Dhiviya Thirumavalavan - avatar
4 Respuestas
+ 1
Dhiviya Thirumavalavan k is not set to 1 once it is updated to 3 in while loop... hence, while loop is not printing anything during second value onwrords in outer loop... what output you expect?
15th Sep 2018, 3:20 PM
Ketan Lalcheta
Ketan Lalcheta - avatar
0
Ketan Lalcheta Thank u my friend.. Got clarification from your doubt I am expecting the output as 7 14 21 14 21 28 35 28 21 28 35 42 49 42 35 28 if u know the logic say me friend
19th Sep 2018, 10:34 AM
Dhiviya Thirumavalavan
Dhiviya Thirumavalavan - avatar
19th Sep 2018, 1:06 PM
Ketan Lalcheta
Ketan Lalcheta - avatar
0
Ketan Lalcheta Thanks a lot my friend😊😊😊😊😊
19th Sep 2018, 1:11 PM
Dhiviya Thirumavalavan
Dhiviya Thirumavalavan - avatar