by @mary sousa Fork
{"functions":[],"name":"algo 3","main":{"rawId":"main","tpe":"Void","name":"main","statements":[{"@type":"Begin","id":"id_2fb91474_6bf5_40df_a738_6dfe1782ce5e"},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"Real","name":"quantidade","lengthValue2":"5","id":"id_f63b1117_5bba_44f3_bdf5_ec6f58323d57","initValue":null},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"Real","name":"preco","lengthValue2":"5","id":"id_ef7d8aa3_d9b6_497c_a615_af4c671ff379","initValue":null},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"Real","name":"subtotal","lengthValue2":"5","id":"id_ebb0ee54_4fca_40e6_8667_57b18f751b89","initValue":null},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"Real","name":"percentual","lengthValue2":"5","id":"id_d383ad11_d87c_4ad1_bf92_7b3d25b83300","initValue":null},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"Real","name":"valorDesconto","lengthValue2":"5","id":"id_2fb57c55_2ef6_4787_bd46_349bc7115add","initValue":null},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"Real","name":"total","lengthValue2":"5","id":"id_89381c26_2c04_4f20_841f_4dcad9b2db20","initValue":null},{"@type":"Input","name":"quantidade","id":"id_ec2e94c8_3dbf_455f_9429_c600ce741bdb","prompt":"Please enter x:"},{"@type":"Input","name":"preco","id":"id_6c12d1b0_cc39_439f_abf9_225f7d9791f4","prompt":"Please enter x:"},{"falseBlock":{"statements":[{"@type":"Assign","name":"subtotal","id":"id_223b1068_7d7a_48d2_9988_d85ae3b8ebc8","value":"quantidade*preco"},{"falseBlock":{"statements":[{"falseBlock":{"statements":[{"@type":"Assign","name":"percentual","id":"id_1bb5ee75_4198_4cb0_b31f_944f13dcc0b9","value":"12"}],"id":"id_8ce82af9_4ffb_4c0b_a101_092dd7214173"},"trueBlock":{"statements":[{"@type":"Assign","name":"percentual","id":"id_9891ddf9_5200_492a_959b_0737644b91c9","value":"5"}],"id":"id_c1ac9ef2_1881_4b49_b54c_21ce28d21dd4"},"condition":"subtotal<300","@type":"If","id":"id_a6c7414f_d6ab_42b9_a99b_fa46da7b3144"}],"id":"id_ddd479c0_5040_45dd_910f_08d31da49b80"},"trueBlock":{"statements":[{"@type":"Assign","name":"percentual","id":"id_307dbd9b_a65d_4286_a81c_7b2ed2110a69","value":"0"}],"id":"id_2c6a45ec_add4_4781_bd17_8c2b8730d2e1"},"condition":"subtotal<150","@type":"If","id":"id_19934976_2b49_4a52_bf71_40e5ba6bab8d"},{"@type":"Assign","name":"valorDesconto","id":"id_fabc25e4_d421_4e2a_9c12_99bcbb0a1ae5","value":"subtotal*(percentual/100)"},{"@type":"Assign","name":"total","id":"id_e65f1b15_69d7_4894_a276_85f1ad0ca047","value":"subtotal-valorDesconto"}],"id":"id_fc76c5d8_d26d_4e2d_8ed9_5bb22200dd89"},"trueBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_2baa0cbd_5fdf_4097_bf40_0a821f8fec20","value":"\"Dados invalidos\""}],"id":"id_0ada1338_4acf_45da_9b5f_38038a0b383a"},"condition":"quantidade<=0 \\|| preco<=0","@type":"If","id":"id_569d4d51_646c_4ded_a6ce_4cbf8f0089fa"},{"@type":"Return","id":"id_d8a01854_df88_468e_93b2_0e99480cea35","maybeValue":null}],"parameters":[]},"id":"id_c6b1f43f_f58f_47ac_810a_2a9a823003d1","config":{"showDebugVars":true,"useInputPrompt":true,"echoEnteredValue":true,"showIoBtns":true,"showFunctions":true,"lang":"java","showGenCode":true},"version":"0.3","revision":430}