Why use double? feet is defined as int so no double result is returned. You could use long for this purpose.