by @Wichart Manachaimongkol Fork
{"functions":[],"name":"LoopExercise7","main":{"rawId":"main","tpe":"Void","name":"main","statements":[{"@type":"Begin","id":"id_ba251e17_eaa7_474b_b528_f2c46ad8fece"},{"@type":"Comment","id":"id_45bbe61b_49ef_4d4f_83bd_c1aed55749e7","text":"This to show Fibonacci numbers less than assigned number default is 50. Fibonacci sequence is a sequence in which each number is the sum of the two preceding ones."},{"@type":"Declare","tpe":"Integer","name":"n","id":"id_5f685cf9_cd8c_43b1_a89a_1fd3d6246c16","initValue":null},{"@type":"Input","name":"n","id":"id_577c3972_3dc5_41f3_ba63_34231a477ce4","prompt":"Please enter end number or 0 to use default(50) : "},{"falseBlock":{"statements":[],"id":"id_24aada19_a463_4610_be8a_ba2fd2a4951d"},"trueBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_eeb73375_b3d6_48b0_b7db_9bba0cc73bd3","value":"\"Use defalut is 50.\""},{"@type":"Assign","name":"n","id":"id_3a33a023_8fe1_455e_bb78_a8b22fdade06","value":"50"}],"id":"id_c5f2e79f_3cf3_46f0_b282_738a3b0c70f1"},"condition":"n == 0","@type":"If","id":"id_e9199911_91c4_4c5e_8ba5_b0b31f00220a"},{"@type":"Declare","tpe":"Integer","name":"Preceding1","id":"id_bf1f7d63_dde7_4769_9d0a_af10fb28ab55","initValue":"0"},{"@type":"Declare","tpe":"Integer","name":"Preceding2","id":"id_09e6b2ce_8748_4790_9122_4e2187f54ae2","initValue":"1"},{"newline":false,"@type":"Output","id":"id_f80b9601_2c70_4367_a418_35008ddbee78","value":"\"\" + Preceding1 + \" \" + Preceding2 + \" \""},{"@type":"Declare","tpe":"Integer","name":"Fi","id":"id_e9bcbd75_bb29_4513_af9f_185266e0e6f2","initValue":"0"},{"varName":"i","incr":"1","@type":"ForLoop","start":"1","end":"n - 1","id":"id_16e30066_5e63_48fc_8954_4ad02f5dfe49","body":{"statements":[{"@type":"Assign","name":"Fi","id":"id_631f2f5a_9d35_4d86_a5b7_84e7afbebf3d","value":"Preceding1 + Preceding2"},{"newline":false,"@type":"Output","id":"id_ed87fd56_5a80_4e62_a4dd_795a4c4d19a7","value":"\"\" + Fi + \" \""},{"@type":"Assign","name":"Preceding1","id":"id_a2ad8a29_9f74_4518_b4b2_0567a4415a35","value":"Preceding2"},{"@type":"Assign","name":"Preceding2","id":"id_70b26856_eff0_4785_a2d4_fae188d0c80e","value":"Fi"}],"id":"id_9854a372_4258_4631_9417_6b42438b2213"}},{"@type":"Return","id":"id_1918c102_6c55_43d0_af20_835af9feae1a","maybeValue":null}],"parameters":[]},"id":"id_ba126d1e_dfe7_4705_b096_b387d306c0ec","config":{"showDebugVars":true,"showIoBtns":true,"showFunctions":true,"lang":"java","showGenCode":true},"version":"0.2","revision":869}