On Monday, January 27, 2020 at 11:16:12 AM UTC-5, Sam Whited wrote:
>
> On Mon, Jan 27, 2020, at 02:41, Kareem Shaikh wrote: 
> > Can anyone please tell me what should I change in order to get the right 
> output? 
> > 
> > For example: 
> > 
> > I want to change 10 degrees to Fahrenheit. 
> > I want to print "10 degrees to Fahrenheit is = 50" 
>
> You want to use one of the formatting functions, for example: 
>
>     fmt.Printf("%f Degrees to Fahrenheit is = %f\n", Degrees, fahrenheit) 
>
> For more information, see the fmt documentation: https://godoc.org/fmt


That's how I would do it. But you can also use fmt.Println, just change the 
order:
fmt.Println(Degrees, "to Farenhiet is =", farenhiet)
https://play.golang.org/p/XyQ7CtuWdbg

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/027482d2-4d5c-4a73-b041-b7e66a4f9e35%40googlegroups.com.

Reply via email to