m = CStr(InputBox("ukucajte masu u kilogramima")) h = CStr(InputBox("ukucajte visinu u centimetrima")) Podesi m: Podesi h: m = CSng(m): h = CSng(h) MsgBox "BMI (indeks tjelesne mase) je:" _ & vbCrLf & Round(((m * 1.3) / ((h / 100) ^ 2.5)), 1) End Sub Public Sub Podesi(ByRef e) If Mid(CStr(3 / 2), 2, 1) = "." Then Podes2 e, ",", "." _ Else Podes2 e, ".", "," End Sub Public Sub Podes2(ByRef e, e1, e2) ee = CLng(InStr(1, e, e1, 1)) If ee > 0 Then e = CStr(Left(e, ee - 1) & e2 & Right(e, Len(e) - ee)) End Sub
Prikaži sve komentare (9)