Vorschau
This calculator provides body mass index (BMI) and the corresponding BMI weight status category for adults 20 years and older.
Neue Funktionen
Version 1.1
Link fixed.
Was er macht
38 Aktionen-
CommentAuthor: Ari R. Abdulla Usage: - This calculator provides body mass index (BMI) and the corresponding BMI weight status category for adults 20 years and older.
-
Choose from MenuWhich measurement system do you want?
-
Choose from MenuStandard
-
Ask for InputEnter your height? (Feet)
-
Set VariableFeet
-
Ask for InputAnd inches?
-
Set VariableInches
-
Ask for InputEnter your weight? (Pounds)
-
Set VariablePounds
-
Calculate
-
Set VariableRfeet
-
Calculate
-
Set VariableRinches
-
Calculate
-
Set VariableFIHeight
-
Calculate
-
Set VariableMFIHeight
-
Calculate
-
Set VariableSMFIHeight
-
Calculate
-
Set VariableKGWeight
-
Calculate
-
Round Number
-
Set VariableBMII
-
Show Alert
-
Choose from MenuMetric
-
Ask for InputEnter your height? (Centimeter)
-
Set VariableHeight
-
Ask for InputEnter your weight? (Kilogram)
-
Set VariableWeight
-
Calculate
-
Set VariableHmeter
-
Calculate
-
Set VariableHsquare
-
Calculate
-
Round Number
-
Set VariableBMI
-
Show Alert
Als Code ansehen
Jede Aktion dieses Kurzbefehls als Cherri ausgeschrieben, eine Programmiersprache für Kurzbefehle. Ideal, um zu lernen, wie er funktioniert.
#include 'actions/math'
#define color teal
#define glyph calculator
/*
Author: Ari R. Abdulla
Usage:
- This calculator provides body mass index (BMI) and the corresponding BMI weight status category for adults 20 years and older.
*/
menu "Which measurement system do you want?" {
item "Standard":
prompt("Enter your height? (Feet)", "Number")
@Feet
prompt("And inches?", "Number")
@Inches
prompt("Enter your weight? (Pounds)", "Number")
@Pounds
@Rfeet = @Feet * 30.48
@Rinches = @Inches * 2.54
@FIHeight = @Rfeet + @Rinches
@MFIHeight = @FIHeight / 100
@SMFIHeight = @MFIHeight … nil
@KGWeight = @Pounds / 2.205
const CalculationResult = @KGWeight / @SMFIHeight
ceil(CalculationResult, "Tenths")
@BMII
confirm("Your BMI is: {@BMII}\nBMI Categories:\nUnderweight = <18.5\nNormal weight = 18.5-24.9\nOverweight = 25-29.9\nObesity = >30")
item "Metric":
prompt("Enter your height? (Centimeter)", "Number")
@Height
prompt("Enter your weight? (Kilogram)", "Number")
@Weight
@Hmeter = @Height / 100
@Hsquare = @Hmeter … nil
const CalculationResult1 = @Weight / @Hsquare
ceil(CalculationResult1, "Tenths")
@BMI
confirm("Your BMI is: {@BMI}\nBMI Categories:\nUnderweight = <18.5\nNormal weight = 18.5-24.9\nOverweight = 25-29.9\nObesity = >30")
}
In Cherri Playground öffnen
Mit cherri 2.3.0 (GPL-2.0) dekompiliert. Eventuell sind kleine Korrekturen nötig, bevor es kompiliert wird.
Bewertungen und Rezensionen
Rezension schreiben–
von 5
★★★★★
★★★★
★★★
★★
★
0 ratings
No reviews yet. Be the first to share what you think!
Werbung
Mehr von arirafiq
Das gefällt dir vielleicht auch
Werbung