xcode - BMI calculator compiler error swift -



xcode - BMI calculator compiler error swift -

var bmivalue = (weighttextfield*703)/(heighttextfield*heighttextfield)

my error:

cannot invoke '/' argument list of type '(($t5), ($t11))'

i had made effort on making simple bmi calculator function have typed out brings compiler errors. can please help me. give thanks much.

this solution , converts uitextfields text floats , assign bmi value float variable.

var weight = (weightltextfield.text nsstring).floatvalue var height = (heighttextfield.text nsstring).floatvalue var bmivalue = (weight*703)/height

hope helps .

xcode swift

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -