by @meradiayoub Fork
{"functions":[],"name":"simpleCalculator","main":{"rawId":"main","tpe":"Void","name":"main","statements":[{"@type":"Begin","id":"id_d9807ea9_f45f_47c3_913c_83f6422bcc73"},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"Real","name":"num1","lengthValue2":"5","id":"id_8b7cda2d_ca96_4bd0_beef_ada4d501070c","initValue":null},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"Real","name":"num2","lengthValue2":"5","id":"id_790e700c_7e91_4900_9610_69359b2abc7b","initValue":null},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"Real","name":"result","lengthValue2":"5","id":"id_f7830d51_36be_480c_8f94_cb78daeba4fd","initValue":null},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"String","name":"opCode","lengthValue2":"5","id":"id_d0d573fc_b197_4372_b274_1ffbb7c53158","initValue":null},{"newline":true,"@type":"Output","id":"id_e2973270_cd83_42b5_8931_e4db553f0c0a","value":"\"Enter the first number : \""},{"@type":"Input","name":"num1","id":"id_e3eb654e_0a12_49a8_8bfa_0223d38e5ffb","prompt":null},{"newline":true,"@type":"Output","id":"id_39073026_4c55_48f0_8d48_278257cb2c51","value":"\"Enter the second number : \""},{"@type":"Input","name":"num2","id":"id_cb2542e0_4bfa_42d8_8b6a_b127e2b0df65","prompt":null},{"condition":"!(opCode == \"+\" || opCode == \"-\" || opCode ==\"*\" || opCode ==\"/\" )","@type":"DoWhile","id":"id_17baf21e_2d04_4b96_87e1_f867e6b2d3b4","body":{"statements":[{"newline":true,"@type":"Output","id":"id_f99c4226_aef9_4713_bf2a_ecf4e00d09fd","value":"\"Enter the operation type : \""},{"@type":"Input","name":"opCode","id":"id_8114535f_c527_4dbc_8c20_a122f0c419f2","prompt":null}],"id":"id_0438d3b4_4d06_47c5_be05_fbf95f6547c8"}},{"falseBlock":{"statements":[{"falseBlock":{"statements":[{"falseBlock":{"statements":[{"falseBlock":{"statements":[{"@type":"Assign","name":"result","id":"id_9fc101e8_ece8_42cb_a571_a4861f92b8a8","value":"num1 / num2"}],"id":"id_1aa62d22_0462_4837_a6ac_dc76e8d3f12b"},"trueBlock":{"statements":[{"@type":"Assign","name":"result","id":"id_dbf2ba0f_b0b2_4877_9680_7520e08cd41d","value":"num1 * num2"}],"id":"id_eef49af5_1ece_4f22_b88b_0379c82f932e"},"condition":"opCode == \"*\"","@type":"If","id":"id_ec30b846_53c1_4bde_aa06_67b2806155d3"}],"id":"id_9071afe4_c1fb_4a0f_a4b4_790ac5d4aaaa"},"trueBlock":{"statements":[{"@type":"Assign","name":"result","id":"id_8c4fb684_491c_4aa0_a871_bff9e9e74797","value":"num1 - num2"}],"id":"id_47e62fe1_67f2_4a15_a3f8_df2f00ebef6a"},"condition":"opCode == \"-\"","@type":"If","id":"id_44115e0c_941b_4c0a_bbed_4dcdc253cefb"},{"newline":true,"@type":"Output","id":"id_70069322_5b2e_4010_953e_10c12dc572c6","value":"\" \" + num1 + \" \" + opCode +\" \" + num2 + \" = \" + result + \" . \""}],"id":"id_9026516f_e07f_41e4_af0d_f18713446d80"},"trueBlock":{"statements":[{"@type":"Assign","name":"result","id":"id_03efc13b_8088_4c38_944a_c0951690abfe","value":"num1 + num2"},{"@type":"Assign","name":"x","id":"id_325e0170_0f70_40e3_a730_5d128334c98b","value":"19"}],"id":"id_793f65d1_1568_47ed_9a02_300110d47248"},"condition":"opCode == \"+\"","@type":"If","id":"id_acbef0fb_4955_4408_9997_efd9f2f4d04f"}],"id":"id_cef93ab9_55c0_4942_a55d_c2969536f1c4"},"trueBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_94bf1a12_ea96_46a1_8da0_ad0a2bfa05a1","value":"\" Error the division by Zero"},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"Integer","name":"x","lengthValue2":"5","id":"id_fabf1c1c_5eec_4f0b_8be6_df02dab07e3a","initValue":null}],"id":"id_3f326b77_9d88_4868_b863_37c1c087c2c0"},"condition":"(opCode == \"/\" && num2 == 0)","@type":"If","id":"id_fe09af95_61ab_4ac9_88bd_75fea817d802"},{"@type":"Return","id":"id_98164600_b936_40ca_90fa_85e2e007fad2","maybeValue":null}],"parameters":[]},"id":"id_da029972_d489_449c_a464_687f117c46c2","config":{"showDebugVars":true,"useInputPrompt":false,"echoEnteredValue":true,"showIoBtns":true,"showFunctions":false,"lang":"java","showGenCode":false},"version":"0.3","revision":800}