logo image

Go language program to convert inches to feet

Views: 18

Following program shows you how to convert inches to feet. In this program we get inches from user, once we get those we need to divide with 12 so that we get in feet

package main

import "fmt"

func main() {

  var inches float64
  var feet float64
  fmt.Println("Please enter inches:")
  fmt.Scanf("%f", &inches)
  feet = inches / 12
  fmt.Println(feet , " Feet")


Please enter inches:
2.5  Feet
We are looking for Interns!
Send your resumes to
[email protected]