{"functions":[],"name":"COMP 1400 assignmnet 1","main":{"rawId":"main","tpe":"Void","name":"main","statements":[{"@type":"Begin","id":"id_af1da1bc_fe56_4193_b329_88ea425d950a"},{"newline":true,"@type":"Output","id":"id_a791cf26_bc15_4cb2_9366_1fa609b3491b","value":"\"welcome to my command line calculator\""},{"newline":true,"@type":"Output","id":"id_79bf035f_2495_4e81_bc04_3875d5e23394","value":"\"Developer: Ayesha Jafri\""},{"newline":true,"@type":"Output","id":"id_57ffcd30_574c_42bc_9ca5_7eef493b882d","value":"\"version: 1\""},{"newline":true,"@type":"Output","id":"id_5e44dd35_8e9a_4285_b391_1592ba52f60d","value":"\"date: 22/10/24\""},{"newline":true,"@type":"Output","id":"id_378e8c6c_df51_47fa_817e_8624e0f38dc0","value":"\"select one of the following items:\""},{"newline":true,"@type":"Output","id":"id_8409653f_96fd_4a65_9fc9_fa04beb43e9c","value":"\"B) - Binary Mathematical Operations, such as addition and subtraction.\""},{"newline":true,"@type":"Output","id":"id_b68321e8_c81c_46df_a1f0_60531f54c108","value":"\"U) - Unary Mathematical Operations, such as square root, and log.\""},{"newline":true,"@type":"Output","id":"id_55acad6f_828b_44a1_bc57_4bdeac814890","value":"\"A) - Advances Mathematical Operations, using variables, arrays.\""},{"newline":true,"@type":"Output","id":"id_90e81487_3cc3_4346_981a_5ba89b2a564c","value":"\"V) – Define variables and assign them values.\""},{"newline":true,"@type":"Output","id":"id_251433df_45c7_4ee1_b536_1197539760fc","value":"\"E) - Exit\""},{"newline":true,"@type":"Output","id":"id_20f0875a_4593_483c_93a6_28c504d44f95","value":"\"-----------------------------------------------------------------\""},{"@type":"Declare","tpe":"String","name":"item","id":"id_9a49b484_55f7_444e_afd3_43b489a2b9fa","initValue":"\"B\""},{"@type":"Declare","tpe":"Integer","name":"num1","id":"id_899b22c7_f013_45ef_b862_55693edbe897","initValue":"0"},{"@type":"Declare","tpe":"Integer","name":"num2","id":"id_d6fabe30_18ae_4c19_9096_7a5e6bb62dde","initValue":"0"},{"@type":"Declare","tpe":"Integer","name":"result","id":"id_191c6fcc_7912_4a57_9fce_6063b5fc763f","initValue":"0"},{"@type":"Declare","tpe":"String","name":"operation","id":"id_6c47f27c_6bb1_4013_9fbc_084f4c36972a","initValue":"\"-\""},{"@type":"Input","name":"item","id":"id_4031871f_9e7f_4782_949c_98d8d21b8fe1","prompt":"Please enter an item"},{"condition":"item == \"b\"","@type":"While","id":"id_1fdd3571_0f23_4a4a_96ae_4aa23757ba1d","body":{"statements":[{"@type":"Input","name":"num1","id":"id_ceb36431_2e90_445b_8f0a_a32e70afd262","prompt":"please enter a number"},{"@type":"Input","name":"operation","id":"id_432fd391_59db_4c5b_ba81_1f224afb2210","prompt":"please enter an operation (+,-,*,/)"},{"@type":"Input","name":"num2","id":"id_03ad3d04_f6cf_4f12_9cb0_7f83e0b9d027","prompt":"please enter a second number"},{"falseBlock":{"statements":[{"falseBlock":{"statements":[{"falseBlock":{"statements":[{"falseBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_1ea4ce87_4ca7_42ae_a602_c9299e00cf3a","value":"\"error, please select a valid operation\""}],"id":"id_065ff72e_ad3e_4b0f_a2a9_dac2fe8808bc"},"trueBlock":{"statements":[{"falseBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_5ba519bc_c271_4a31_977e_365711805d20","value":"\"**error, division by 0**\""}],"id":"id_e2ff46e8_fc6e_4625_9516_f184a6dd64af"},"trueBlock":{"statements":[{"@type":"Assign","name":"result","id":"id_8d0688a3_8093_4f89_a316_4a6ad61a2a4e","value":"num1 / num2"},{"newline":true,"@type":"Output","id":"id_62dee1e9_f9b0_4e80_89cb_074fc4a77512","value":"\"the result is \""},{"newline":false,"@type":"Output","id":"id_05b39b41_4903_4dba_b1fb_12f986e6e726","value":"result"}],"id":"id_ff938a48_b04d_42b3_8d43_23b447e05206"},"condition":"num2 !=0","@type":"If","id":"id_d3c5180b_8b76_4202_b157_f3385555fb55"}],"id":"id_fc3d0a07_3bc2_448a_94fb_a18fd1174be9"},"condition":"operation == \"/\"","@type":"If","id":"id_20242b7f_7a2d_4c1b_acc9_a7ca8d866fed"}],"id":"id_7aba4bd9_29c0_4416_ae54_520af52a1da6"},"trueBlock":{"statements":[{"@type":"Assign","name":"result","id":"id_f4277229_9df1_4df9_840d_79286c196559","value":"num1 * num2"},{"newline":true,"@type":"Output","id":"id_55c85a6a_e503_4d94_b521_359095b36acf","value":"\"the result is \""},{"newline":false,"@type":"Output","id":"id_0128cdd6_f4b0_4b3f_bfc0_bd2a47658bb9","value":"result"}],"id":"id_f5e55903_a3c2_4276_b4e5_e3abb6133f5f"},"condition":"operation == \"*\"","@type":"If","id":"id_1a521f1d_54a2_45b2_bbbc_e811d440d9cc"}],"id":"id_5b894736_03d3_4dcb_8ffc_60f7c3fe8436"},"trueBlock":{"statements":[{"@type":"Assign","name":"result","id":"id_25c6dd89_9e19_44b7_a567_0310ef6fa18d","value":"num1 - num2"},{"newline":true,"@type":"Output","id":"id_3a472908_a185_4709_a842_6f321b7e577f","value":"\"the result is \""},{"newline":false,"@type":"Output","id":"id_e1a66d7d_5131_431e_b454_594a75507602","value":"result"}],"id":"id_51bb133e_8c32_4b0d_b9db_dee922749825"},"condition":"operation == \"-\"","@type":"If","id":"id_3b1223ce_16b6_4bf0_aad3_d80527458196"}],"id":"id_cea08ec4_6cfc_4cc6_8cc3_45da752e2454"},"trueBlock":{"statements":[{"@type":"Assign","name":"result","id":"id_48de9808_a87c_42b7_98e2_cea8a6f43a68","value":"num1 + num2"},{"newline":true,"@type":"Output","id":"id_b2a5f083_80a6_4f8c_b11f_2161689609a7","value":"\"the result is \""},{"newline":false,"@type":"Output","id":"id_cf15720f_88b2_41c4_8008_5b1a546b5e1f","value":"result"}],"id":"id_22529b1c_56b2_4a57_a97a_74d213159a7b"},"condition":"operation == \"+\"","@type":"If","id":"id_3d6f27fc_8293_4517_a9c4_9f59841127bf"},{"@type":"Input","name":"item","id":"id_2b2e0c4d_aeb9_433f_8d56_3690a4e42348","prompt":"\"please select your option ( B , U , A , V , E )"}],"id":"id_240af513_d41f_4b65_8006_06e1a6a8448c"}},{"falseBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_e4224680_93ab_494f_8efe_91afdee2ccf7","value":"\"error, please restart\""}],"id":"id_2256439a_904b_43c9_a916_0149526c7fd5"},"trueBlock":{"statements":[{"newline":true,"@type":"Output","id":"id_df24d1b0_9d6d_48d3_a958_2dc9792fc801","value":"\"Thanks for using my Simple Calculator. Hope to see you again soon. Goodbye!\""}],"id":"id_2db9dbdd_63c9_4d6d_b51c_60c65e13ec7e"},"condition":"item == \"e\"","@type":"If","id":"id_3baff5f7_4715_48f1_99e6_4e119b749003"},{"@type":"Return","id":"id_63579302_ec52_40af_a147_3506710c8fe5","maybeValue":null}],"parameters":[]},"id":"id_c7cc8eb4_ba9c_4524_8d1d_244ea4e220a1","config":{"showDebugVars":true,"showIoBtns":true,"showFunctions":true,"lang":"c","showGenCode":true},"version":"0.2","revision":1939}