Go language program to convert dollars to rupees

Views: 112   

Following program shows you how to convert dollar to rupees.
In this program we get dollars from user, once we get those we need to multiply with 64 so that we get in rupees

package main

import "fmt"

func main() {

  var dollars float64
  var rupees float64
  fmt.Println("Please enter dollars:")
  fmt.Scanf("%f", &dollars)
  rupees = dollars * 64
  fmt.Println(rupees , " Rupees")
}

Output:

Please enter dollars:
 1000
64000  Rupees
On By