ok that work but Go Playground doesn’t support keyboard input and i want the user to input a equation, so I started coding and got this:
package main
import "fmt"
func main () {
var a , b int
var op, s string
fmt.Scanln( &s)
fmt.Fscanf(s ,"%d %s %d", &a ,&op ,&b)
fmt.Println(a, b , op)
fmt.Println(s)
}
and here is the problem I'm having
1- fmt.Scanln dose not read the line it only reads till the \n -> this most be a bug right!?
2- fmt.FscanF doesn't accepts the string 's'
On Monday, February 4, 2013 4:09:24 PM UTC+1, Bardia Jedi wrote: