{"id":"id_78bda2c7_48dd_4a60_a348_a043375b7f1a","name":"Discount Calculator","config":{"lang":"javascript","showFunctions":true,"showGenCode":false},"main":{"rawId":"main","name":"main","parameters":[],"tpe":"Void","statements":[{"id":"id_fe9b69bc_cdc9_4359_90c6_f32d1c6be5ce","@type":"Begin"},{"id":"id_f09a9d2e_8cac_4bc5_9912_34a283906c28","name":"amount","tpe":"Real","initValue":null,"@type":"Declare"},{"id":"id_33af44f6_e92e_49c3_9f5a_672cf5bd43c0","name":"amount","prompt":null,"@type":"Input"},{"id":"id_0d4d72a2_10ef_4d60_ae9b_c72a29903324","name":"d","tpe":"Real","initValue":"calcDiscount(amount)","@type":"Declare"},{"id":"id_e7c439ff_bd37_442a_8420_4e0677ff7cef","value":"\"Discount %: \" + d","newline":true,"@type":"Output"},{"id":"id_ded5c2a1_370a_44d7_bebb_7c57f92e64e8","maybeValue":null,"@type":"Return"}]},"functions":[{"rawId":"id_5bf127fd_30b8_44c9_8e42_a193dd8a091d","name":"calcDiscount","parameters":[{"id":"4dff1538-c025-469f-b540-bff36590cb58","name":"amount","tpe":"Real"}],"tpe":"Real","statements":[{"id":"id_3035c914_8615_422a_b1c6_7b024c5d9af4","@type":"Begin"},{"id":"id_cb1c4b65_4662_432a_8a80_a87be44b30ae","name":"discount","tpe":"Real","initValue":null,"@type":"Declare"},{"id":"id_cfe2735b_0710_4194_ac4c_562059e28366","condition":"amount > 100","trueBlock":{"id":"id_0c81cf29_fe4a_4b7a_94b7_aa5fd987f404","statements":[{"id":"id_0d8ec699_5144_49be_b891_b54d02e1342f","condition":"amount > 1000","trueBlock":{"id":"id_6f4ee3d8_845e_45c6_80aa_208b5d8ebfd2","statements":[{"id":"id_f6166449_adc9_400d_a41f_ec160bfa749e","name":"discount","value":"20","@type":"Assign"}]},"falseBlock":{"id":"id_ac92d778_d8c0_4a06_898d_38dc06149340","statements":[{"id":"id_747f34bf_9ab9_4482_b183_a7fa8e16a0b0","name":"discount","value":"10","@type":"Assign"}]},"@type":"If"}]},"falseBlock":{"id":"id_82863dba_3ef2_4eea_bf0d_c26bb4bee20d","statements":[{"id":"id_26a63916_48e4_4ce9_891a_7ef770513db5","name":"discount","value":"5","@type":"Assign"}]},"@type":"If"},{"id":"id_6940f2b8_2304_4281_a82c_4fff63a1a3cd","maybeValue":"discount","@type":"Return"}]}],"version":"0.1"}
Settings