Settings

            
{"id":"id_bdae8193_a6cc_410c_8081_9e8e48de4baf","name":"BMI calculator","config":{"lang":"java","showFunctions":true,"showGenCode":false},"main":{"rawId":"main","name":"main","parameters":[],"tpe":"Void","statements":[{"id":"id_41b3ad45_658d_4d9a_aca5_81b0d5244ebd","@type":"Begin"},{"id":"id_fe750971_f73f_44e0_a97c_8ce7d369a808","name":"w","tpe":"Real","initValue":null,"@type":"Declare"},{"id":"id_bb0689c5_6aac_4ced_b118_36a4aba07adc","name":"h","tpe":"Real","initValue":null,"@type":"Declare"},{"id":"id_1c46aa52_01ef_48f4_b8d7_0345ea75031c","name":"w","prompt":"Please enter your weight in kg: ","@type":"Input"},{"id":"id_72999a30_2972_4490_a6aa_22a134fbf48d","name":"h","prompt":"Please enter your height in m: ","@type":"Input"},{"id":"id_7586ac24_0421_45c0_9578_05e216a072ec","name":"bmi","tpe":"Real","initValue":"bmi(h,w)","@type":"Declare"},{"id":"id_e405a479_4e43_4980_bc5f_63294792eec9","value":"\"Your BMI is \" + bmi","newline":true,"@type":"Output"},{"id":"id_5f9cfb07_6f24_4b4e_89e6_45c2fa8b6bb0","value":"printType(bmi)","@type":"Call"},{"id":"id_b493fab8_3bb3_4c63_85f7_331095562863","maybeValue":null,"@type":"Return"}]},"functions":[{"rawId":"id_92fac955_5ee5_4d5a_86c0_965cb72983fc","name":"bmi","parameters":[{"id":"7dfcbb2d-a408-47bd-bd4f-afa837b0e702","name":"height","tpe":"Real"},{"id":"644569fd-b36b-4818-8e75-ab25784a3a77","name":"weight","tpe":"Real"}],"tpe":"Real","statements":[{"id":"id_98959eed_7adc_45c0_8c59_f15b79b7e88b","@type":"Begin"},{"id":"id_767f6fb3_8455_4388_b878_087a40036cab","maybeValue":"weight / (height*height)","@type":"Return"}]},{"rawId":"id_d4da7911_bdd4_4d61_a95c_8787bd8e2e9c","name":"printType","parameters":[{"id":"46dd8e46-3202-4814-8f5f-64aaa3e19b88","name":"bmi","tpe":"Real"}],"tpe":"Void","statements":[{"id":"id_1d58d7ac_0fd7_4992_960d_347904ec843f","@type":"Begin"},{"id":"id_ac4e503c_0b8c_40bb_a2fc_667bcac69b11","condition":"bmi<18.5","trueBlock":{"id":"id_f601a9f0_f810_428c_a75a_555216bca1ae","statements":[{"id":"id_bfd6d514_7c5d_4331_8795_1ef3e395d8c3","value":"\"underweight\"","newline":true,"@type":"Output"}]},"falseBlock":{"id":"id_ccac4547_6f97_4d73_b92a_6902090fdf13","statements":[{"id":"id_21191261_3ac8_4a49_9345_0d3d0196fef4","name":"x","tpe":"Integer","initValue":null,"@type":"Declare"},{"id":"id_7752640a_53f9_4ea5_bd07_fc9a5a2d394e","name":"x","prompt":null,"@type":"Input"},{"id":"id_e7145259_06e6_4913_8b4d_6e94dc543dae","condition":"bmi<24.9","trueBlock":{"id":"id_afea93d2_9eb5_4fa8_a8d8_7aaf6f1ae43d","statements":[{"id":"id_7acf1e2c_bf66_4484_8cb8_817fc7af12e1","value":"\"normal\"","newline":true,"@type":"Output"}]},"falseBlock":{"id":"id_cf0582eb_ef64_4cb7_98e5_72f4709ccbc5","statements":[{"id":"id_d4f05a29_dcca_42e8_867c_1540013c43df","value":"\"overweight\"","newline":true,"@type":"Output"}]},"@type":"If"}]},"@type":"If"},{"id":"id_95656e91_9c5b_4363_9312_fbba74fdf63e","maybeValue":null,"@type":"Return"}]}],"version":"0.1"}
CodeExploreLearnLog In