by @Pedro Ribeiro Fork
{"functions":[],"name":"5.3","main":{"rawId":"main","tpe":"Void","name":"main","statements":[{"@type":"Begin","id":"id_83e1fd50_dd17_40e6_8c60_1f61e2eecdd0"},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"Integer","name":"lugares","lengthValue2":"5","id":"id_d7409c4b_9f1b_41c3_9545_ffef8096b635","initValue":"20"},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"Integer","name":"bilhetes","lengthValue2":"5","id":"id_4847b573_892e_45c5_a16e_7d0aacedbb4b","initValue":"0"},{"condition":"lugares >0","@type":"While","id":"id_0bef3f98_ac0c_4867_bb38_ca610ea21756","body":{"statements":[{"newline":true,"@type":"Output","id":"id_b4e860e1_16e4_41fe_bf15_73cd5e6d389e","value":"\"quantos bilhetes?\""},{"@type":"Input","name":"bilhetes","id":"id_f0c1dd9c_2bf3_4e73_9ce5_a35a46037e10","prompt":null},{"falseBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_3045a1d8_7e94_4baf_ba30_ef40a0f88085","value":"\"só restam \" + lugares + \" lugares\""}],"id":"id_4dbbd67e_7d57_4a73_add9_06334f10c226"},"trueBlock":{"statements":[{"@type":"Assign","name":"lugares","id":"id_ca500316_4b39_493f_b94d_0d5617e3f525","value":"lugares - bilhetes"},{"newline":true,"@type":"Output","id":"id_5a451d33_77c3_4ccc_bb6c_410e0f99808f","value":"\"restam \" + lugares + \" lugares\""}],"id":"id_8a4e2ddd_9189_4471_978f_a74a44e5016d"},"condition":"bilhetes<=lugares","@type":"If","id":"id_d8a10439_d77c_4bc0_be11_dfad70e8665a"}],"id":"id_4c7fd127_b2a5_4fe4_b9d4_cb12064016c0"}},{"newline":true,"@type":"Output","id":"id_2a40d843_dbdf_412f_9cd7_23876809213d","value":"\"esgotado!\""},{"@type":"Return","id":"id_96bcfb58_1a86_49f1_9284_6df3eb19f018","maybeValue":null}],"parameters":[]},"id":"id_9b180841_d450_45d4_835e_2b4827971c24","config":{"showDebugVars":true,"useInputPrompt":false,"echoEnteredValue":false,"showIoBtns":true,"showFunctions":false,"lang":"java","showGenCode":false},"version":"0.3","revision":382}