go语言中Print和Printf以及Println的区别

package main
import(
    "fmt"
)

func main(){
    fmt.Print("在终端打印。")//直接打印
    name:="名字"
    fmt.Printf("名字是:%s\n",name)//参数打印
    fmt.Println("在终端单独一行显示")//换行打印
}

 

posted @ 2024-05-06 10:36  飞雪飘鸿  阅读(20)  评论(0编辑  收藏  举报
https://damo.alibaba.com/ https://tianchi.aliyun.com/course?spm=5176.21206777.J_3941670930.5.87dc17c9BZNvLL