FastFoodCoding

Login


Connect with one of the following accounts





Login

Please wait while we redirect...

Views: 71   



Following program shows you how to convert millimeters into centimeters.
In this program we get millimeters from user, once we get those we need to divide with 10 so that we get in centimeters

package main

import "fmt"

func main() {

  var millimeters float64
  var centimeters float64
  fmt.Println("Please enter millimeters:")
  fmt.Scanf("%f", &millimeters)
  centimeters = millimeters / 10
  fmt.Println(centimeters , " Centimeters")
}

Output:

Please enter millimeters:
 52
5.2  Centimeters



On By


Top Tutorials

Top Questions

Top Articles

Top Blogs

Top News