{"functions":[],"name":"A","main":{"rawId":"main","tpe":"Void","name":"main","statements":[{"@type":"Begin","id":"id_d95f8f33_945c_4bd0_b029_8e6ddde60b62"},{"newline":true,"@type":"Output","id":"id_1b62414e_69cf_4442_a8df_244cedaaac7e","value":"\"Enter the bill amount\""},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"Integer","name":"billAmount","lengthValue2":"5","id":"id_47201f0f_5199_494e_9942_a5e3dcb10941","initValue":"0"},{"@type":"Input","name":"billAmount","id":"id_033db5cd_ec54_443f_aa9f_78e97e59514b","prompt":null},{"falseBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_c2b5f239_7eab_4742_b582_140015583ddc","value":"\"Sorry, the entered value is invalid.\""}],"id":"id_e03bbfc4_aa2a_4e90_b4b7_59509952c90a"},"trueBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_338e1e0e_70c8_4411_a9bc_82870c0ca336","value":"\"output\""},{"newline":true,"@type":"Output","id":"id_38db23c6_7217_4d37_895c_f43649fa183f","value":"\"1. 18%\""},{"newline":true,"@type":"Output","id":"id_1db44203_52c8_4421_ae4c_d5b855d8fe5c","value":"\"2. 20%\""},{"newline":true,"@type":"Output","id":"id_8c755637_d79f_42c6_a692_272e47962177","value":"\"3. 25%\""},{"newline":true,"@type":"Output","id":"id_5921daaf_6444_4842_9229_1dae99af0170","value":"\"4. Custom amount\""},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"Integer","name":"customeTip","lengthValue2":"5","id":"id_e1430cd5_c783_42b9_9acf_5f84ab336c9f","initValue":"0"},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"Integer","name":"tipPercentage","lengthValue2":"5","id":"id_a95ba450_9617_4695_b3eb_5a6029f83ab3","initValue":"0"},{"@type":"Input","name":"customeTip","id":"id_e8d1127d_f1f9_475a_8212_c9441aab3485","prompt":null},{"falseBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_16185628_e380_4317_ba3f_1332b9f576f9","value":"\"Sorry, please choose an option from 1 to 4\""}],"id":"id_602c5185_3c6c_4d31_bdf3_0544eeb52983"},"trueBlock":{"statements":[{"falseBlock":{"statements":[{"falseBlock":{"statements":[{"falseBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_98926b42_af75_4162_8821_5a702b6af78d","value":"\"Enter your desire percentage tip\""},{"@type":"Input","name":"tipPercentage","id":"id_b8f17b88_507d_4235_bbdf_7146a82dc454","prompt":null}],"id":"id_6ffa26ea_a5d1_49bc_b8a1_ad5748ad0f5f"},"trueBlock":{"statements":[{"@type":"Assign","name":"tipPercentage","id":"id_51160345_1b91_44bb_9529_c2b08d575a6b","value":"25"}],"id":"id_9b2cedb3_f129_49db_8061_c4cbed01271e"},"condition":"customeTip == 3","@type":"If","id":"id_c6fd9129_2853_414a_931c_d1cac693acfe"}],"id":"id_917f2119_3a61_44c4_b452_91f6d5b68403"},"trueBlock":{"statements":[{"@type":"Assign","name":"tipPercentage","id":"id_90e56fbe_98cd_43bf_ba2d_6775686ebe0a","value":"20"}],"id":"id_947220e0_9de0_4ac4_9ada_e040a7ede560"},"condition":"customeTip == 2","@type":"If","id":"id_71f2a44c_1ad5_45b3_93a2_b986d53ddff8"}],"id":"id_ff1b8846_2363_4d5b_accc_f6002d684936"},"trueBlock":{"statements":[{"@type":"Assign","name":"tipPercentage","id":"id_44deb4a4_098c_42d4_9991_e258048f929a","value":"18"}],"id":"id_830be5b3_28d5_4f6e_8669_79fcdf743462"},"condition":"customeTip == 1","@type":"If","id":"id_b719783f_29a1_4c86_a151_2c0a7a79bb42"},{"falseBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_2542a7f7_e9d1_4d9c_8c70_b9e87885b17f","value":"\"Sorry the desire tip is invalid\""}],"id":"id_d5b17838_2029_4fa4_9fbe_76606bb9ca41"},"trueBlock":{"statements":[{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"Real","name":"tipAmount","lengthValue2":"5","id":"id_ff877641_8e2c_4a01_a474_a40b8140985f","initValue":"billAmount *(tipPercentage / 100.0)"},{"lengthValue":-1,"@type":"Declare","lengthValue1":"5","tpe":"Real","name":"totalAmount","lengthValue2":"5","id":"id_fdf87cca_2988_43dc_9014_9ceaf89e8705","initValue":"billAmount + tipAmount"},{"newline":true,"@type":"Output","id":"id_029e6b9d_65e2_49db_a74a_e60697e628b0","value":"\"You should leave a tip of $\" + tipAmount"},{"newline":true,"@type":"Output","id":"id_40adb967_a094_48bd_949a_d25b528bdc1a","value":"\"Total amount to pay: $\" + totalAmount"}],"id":"id_5ae57628_2e03_4156_b9eb_76eea9a3c2c5"},"condition":"(tipPercentage >=0)&&((tipPercentage-tipPercentage)==0)","@type":"If","id":"id_5258bc4d_7afa_47f0_b7c3_7fec6bc17773"}],"id":"id_daa3a10c_3a0a_4f81_bf51_70fe3ea5b911"},"condition":"(customeTip>=1)&&(customeTip<=4)","@type":"If","id":"id_9c2ff1c9_f23d_433b_a42e_d42123fccbc1"}],"id":"id_898b1de7_6c4b_4a24_b328_db507ba75f0c"},"condition":"(billAmount >= 0) && ((billAmount - billAmount)==0)","@type":"If","id":"id_8db523ef_1056_4388_a972_1fcd24e39646"},{"@type":"Return","id":"id_3f229c8e_3ac0_4813_86d9_ecd2b8d92d89","maybeValue":null}],"parameters":[]},"id":"id_367486d9_c2db_4dec_a051_16ba4e2a0750","config":{"showDebugVars":true,"useInputPrompt":false,"echoEnteredValue":false,"showIoBtns":true,"showFunctions":false,"lang":"java","showGenCode":false},"version":"0.3","revision":925}