Go语言中使用Print和Println函数输出到标准输出流
在Go语言中,可以使用fmt包中的Print和Println函数将输出打印到标准输出流。\n\ngo\npackage main\n\nimport \"fmt\"\n\nfunc main() {\n fmt.Print("Hello, ")\n fmt.Println("World!")\n}\n\n\n输出结果为:\n\n\nHello, World!\n\n\n注意,Print函数会将输出打印在同一行,而Println函数会在输出的末尾添加一个换行符。
原文地址: https://www.cveoy.top/t/topic/pVhN 著作权归作者所有。请勿转载和采集!