Math/Calculation Problem

Just starting out? Need help? Post your questions and find answers here.
rvq4u
Posts: 9
Joined: Sat Sep 14, 2024 7:20 pm

Math/Calculation Problem

Post by rvq4u »

hi i try to create little Program and search to get a dezimal number with a "," back cant find a way can somone help:


her some code:

Arbeitszeit = ((Stunden * 60) + Minuten) / 60

if Stunden are 6, Minuten are 15 i get back only 6 but it should be 6,25

can someone help please
User avatar
Paul
Posts: 210
Joined: Wed Feb 26, 2014 6:46 pm
Location: Canada
Contact:

Re: Math/Calculation Problem

Post by Paul »

Use a proper type for decimal number...

Code: Select all

Arbeitszeit.d = ((Stunden * 60) + Minuten) / 60
Post Reply