Answer the question
In order to leave comments, you need to log in
How to check a string with text in Golang?
When I try to write to line D5 it just writes 0
package main
import (
"fmt"
"os"
)
func main() {
var pos int
//var postest int
fmt.Println("Введите шахматную позицию от поля D5 (Конь)")
fmt.Fscan(os.Stdin, &pos)
fmt.Println("Вы ввели позицию :" , pos)
Answer the question
In order to leave comments, you need to log in
The variable pos is of type int, how are you going to write D5 to it?
Make a string for example.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question