Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Prodentim Probiotics Specially Designed For The Health Of Your Teeth And Gums

Instant Grammar Checker - Correct all grammar errors and enhance your writing

Teach Your Child To Read

Powerful WordPress hosting for WordPress professionals

Disclosure: My content contains affiliate links.

31,036 questions

40,796 answers

573 users

How to use Scanf() to read data from the standard input in Go

1 Answer

0 votes
package main
 
import (
    "fmt"
)
 
func main() {
    var name string
    var city string
    var age float32

    fmt.Scanf("%s %s %f", &name, &city, &age)
 
    fmt.Printf("%s %s %.1f", name, city, age);
}




/*
run:

dan new_york 58.2

*/

 





answered Jun 9, 2023 by avibootz

Related questions

1 answer 29 views
1 answer 37 views
3 answers 203 views
...