logo image

Go language program to convert feet to inches


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

package main

import "fmt"

func main() {

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


Please enter feet:
144  Inches