by @Pavel Bazhutov Fork
{"functions":[],"name":"Restaurant","main":{"rawId":"main","tpe":"Void","name":"main","statements":[{"@type":"Begin","id":"id_575a91fd_07b6_4541_9b22_aff4a2438e55"},{"@type":"Comment","id":"id_dfc34614_0d29_4a32_ab50_c94dada19684","text":"9/21/24 Author: Pavel Bazhutov"},{"@type":"Declare","tpe":"Real","name":"foodCharge","id":"id_06e540a7_ef81_4f20_82f5_063e50c7b303","initValue":null},{"@type":"Input","name":"foodCharge","id":"id_b1e54c04_2333_41b9_8986_6f0d1155c2da","prompt":"Enter the charge for the food"},{"@type":"Comment","id":"id_437d0e4f_3795_45e3_bfdf_9699fa90eed8","text":"foodCharge is Food cost"},{"newline":false,"@type":"Output","id":"id_56e6ef2d_093f_4170_b950_8d86eac2793b","value":"\"Food charge: \""},{"newline":true,"@type":"Output","id":"id_5c00ee8f_2d39_420f_8457_ffe667b3716b","value":"foodCharge"},{"@type":"Declare","tpe":"Real","name":"tip","id":"id_66e5e377_cde5_4972_b92c_1b6d9394e22c","initValue":"0.15"},{"@type":"Comment","id":"id_c5fe6c9f_7bba_4d0f_b32a_ee9be2e76a5a","text":"Tip is 15% which is 0.15"},{"@type":"Declare","tpe":"Real","name":"tax","id":"id_b588f9d1_b128_41f8_a50c_8cbfe3cbe245","initValue":"0.07"},{"@type":"Comment","id":"id_a7549d61_438b_499a_9182_792b0b115e09","text":"Tax is 7% which is 0.07"},{"@type":"Declare","tpe":"Real","name":"tipValue","id":"id_6b3cb54c_45ff_4a80_b927_575f681a4a2d","initValue":"foodCharge * tip"},{"@type":"Comment","id":"id_0a0a33ad_8947_4bae_894a_99280e2ccf14","text":"tipValue is how much money the person will leave as a tip"},{"newline":false,"@type":"Output","id":"id_c018c341_dd7e_4724_b191_f4add88d9fbb","value":"\"Tips: \""},{"newline":true,"@type":"Output","id":"id_94926e4f_cff6_4363_97c1_4f5b3ed8170a","value":"tipValue"},{"@type":"Declare","tpe":"Real","name":"taxValue","id":"id_88027ca9_5726_4c69_8859_1dc3bdb4b01c","initValue":"foodCharge * tax"},{"@type":"Comment","id":"id_6441c5f8_99e5_4d1c_bc3e_e8ab8aa11705","text":"taxValue is the amount of money person pays as taxes"},{"newline":false,"@type":"Output","id":"id_234e2522_5fc3_40d2_b56a_2804598ca909","value":"\"Tax: \""},{"newline":true,"@type":"Output","id":"id_b4fb840d_06e4_4162_b403_31e9e9db4033","value":"taxValue"},{"@type":"Declare","tpe":"Real","name":"Total","id":"id_5398bf83_27d6_49af_90ff_9fb9095ba9ec","initValue":"foodCharge + tipValue + taxValue"},{"@type":"Comment","id":"id_67663db0_b12c_4340_a23b_3ee2486216a1","text":"Total is the total amount of money person pays after taxes and tips"},{"newline":false,"@type":"Output","id":"id_5c88dc6b_5d9e_4ee6_aa49_4806cd523031","value":"\"Total: \""},{"newline":true,"@type":"Output","id":"id_2be480ec_d9ba_4c97_841b_4f5208f0d93e","value":"Total"},{"@type":"Return","id":"id_43078aff_e2ae_4616_aab0_cae8b1ae2a38","maybeValue":null}],"parameters":[]},"id":"id_b07a5db8_747d_4276_a89f_7d3846438250","config":{"showDebugVars":true,"showIoBtns":true,"showFunctions":true,"lang":"swift","showGenCode":true},"version":"0.2","revision":858}