当前位置: 首页 > news >正文

企业网站建设方案策划深圳百度seo哪家好

企业网站建设方案策划,深圳百度seo哪家好,沈阳网站开发工程师招聘网,seo比较好的公司键盘输入和打印输出 一、打印输出 1.1 fmt包 fmt包实现了类似C语言printf和scanf的格式化I/O。格式化verb(‘verb’)源自C语言但更简单。 详见官网fmt的API:https://golang.google.cn/pkg/fmt/ 1.2 导入包 import "fmt"1.3 常…

键盘输入和打印输出

一、打印输出

1.1 fmt包

fmt包实现了类似C语言printf和scanf的格式化I/O。格式化verb(‘verb’)源自C语言但更简单。

详见官网fmt的API:https://golang.google.cn/pkg/fmt/

1.2 导入包

import "fmt"

1.3 常用打印函数

打印:

func Print(a …interface{}) (n int, err error)

格式化打印:

func Printf(format string, a …interface{}) (n int, err error)

打印后换行

func Println(a …interface{}) (n int, err error)

格式化打印中的常用占位符:

格式化打印占位符:%v,原样输出%T,打印类型%t,bool类型%s,字符串%f,浮点%d,10进制的整数%b,2进制的整数%o,8进制%x,%X,16进制%x:0-9,a-f%X:0-9,A-F%c,打印字符%p,打印地址。。。

示例代码:

package mainimport ("fmt"
)func main() {a := 100           //intb := 3.14          //float64c := true          // boold := "Hello World" //stringe := `Ruby`        //stringf := 'A'fmt.Printf("%T,%b\n", a, a)fmt.Printf("%T,%f\n", b, b)fmt.Printf("%T,%t\n", c, c)fmt.Printf("%T,%s\n", d, d)fmt.Printf("%T,%s\n", e, e)fmt.Printf("%T,%d,%c\n", f, f, f)fmt.Println("-----------------------")fmt.Printf("%v\n", a)fmt.Printf("%v\n", b)fmt.Printf("%v\n", c)fmt.Printf("%v\n", d)fmt.Printf("%v\n", e)fmt.Printf("%v\n", f)}

二、键盘输入

2.1 fmt包读取键盘输入

常用方法:

func Scan(a …interface{}) (n int, err error)

func Scanf(format string, a …interface{}) (n int, err error)

func Scanln(a …interface{}) (n int, err error)

package mainimport ("fmt"
)func main() {var x intvar y float64fmt.Println("请输入一个整数,一个浮点类型:")fmt.Scanln(&x,&y)//读取键盘的输入,通过操作地址,赋值给x和y   阻塞式fmt.Printf("x的数值:%d,y的数值:%f\n",x,y)fmt.Scanf("%d,%f",&x,&y)fmt.Printf("x:%d,y:%f\n",x,y)
}

2.2 bufio包读取

https://golang.google.cn/pkg/bufio/

示例代码:

package mainimport ("fmt""os""bufio"
)func main() {fmt.Println("请输入一个字符串:")reader := bufio.NewReader(os.Stdin)s1, _ := reader.ReadString('\n')fmt.Println("读到的数据:", s1)}

文章转载自:
http://hellebore.jqLx.cn
http://telecentre.jqLx.cn
http://meerschaum.jqLx.cn
http://variorum.jqLx.cn
http://semivolatile.jqLx.cn
http://contract.jqLx.cn
http://fabliau.jqLx.cn
http://nwbn.jqLx.cn
http://vindicable.jqLx.cn
http://entomofauna.jqLx.cn
http://prominent.jqLx.cn
http://bless.jqLx.cn
http://aphetic.jqLx.cn
http://radially.jqLx.cn
http://overeat.jqLx.cn
http://beaucoup.jqLx.cn
http://abound.jqLx.cn
http://temperamental.jqLx.cn
http://recount.jqLx.cn
http://elm.jqLx.cn
http://scarp.jqLx.cn
http://bab.jqLx.cn
http://lemme.jqLx.cn
http://insurgently.jqLx.cn
http://tabbouleh.jqLx.cn
http://oysterwoman.jqLx.cn
http://amenities.jqLx.cn
http://pickaback.jqLx.cn
http://blooper.jqLx.cn
http://allemande.jqLx.cn
http://chucker.jqLx.cn
http://bop.jqLx.cn
http://skating.jqLx.cn
http://repercussive.jqLx.cn
http://innervation.jqLx.cn
http://affective.jqLx.cn
http://economizer.jqLx.cn
http://aggravation.jqLx.cn
http://kinase.jqLx.cn
http://speculum.jqLx.cn
http://milky.jqLx.cn
http://semiabstract.jqLx.cn
http://uncomfortableness.jqLx.cn
http://antinucleon.jqLx.cn
http://seamstress.jqLx.cn
http://auric.jqLx.cn
http://veneto.jqLx.cn
http://secrecy.jqLx.cn
http://squashy.jqLx.cn
http://eulogise.jqLx.cn
http://snobbish.jqLx.cn
http://aponeurosis.jqLx.cn
http://delight.jqLx.cn
http://toolhead.jqLx.cn
http://antipyrine.jqLx.cn
http://galliwasp.jqLx.cn
http://purchaser.jqLx.cn
http://watershed.jqLx.cn
http://leal.jqLx.cn
http://euchre.jqLx.cn
http://avidity.jqLx.cn
http://bacteremic.jqLx.cn
http://grama.jqLx.cn
http://airwoman.jqLx.cn
http://microunit.jqLx.cn
http://tumultuary.jqLx.cn
http://pompano.jqLx.cn
http://photocoagulator.jqLx.cn
http://colloidal.jqLx.cn
http://chorology.jqLx.cn
http://adductor.jqLx.cn
http://thyrotropin.jqLx.cn
http://porte.jqLx.cn
http://kalmyk.jqLx.cn
http://sapan.jqLx.cn
http://wien.jqLx.cn
http://masochist.jqLx.cn
http://fermentable.jqLx.cn
http://lolly.jqLx.cn
http://ardent.jqLx.cn
http://overwind.jqLx.cn
http://cannoli.jqLx.cn
http://yardarm.jqLx.cn
http://idumaean.jqLx.cn
http://telecopier.jqLx.cn
http://roughout.jqLx.cn
http://mizrachi.jqLx.cn
http://thingumajig.jqLx.cn
http://triboelectrification.jqLx.cn
http://ranine.jqLx.cn
http://freshman.jqLx.cn
http://reversibility.jqLx.cn
http://methotrexate.jqLx.cn
http://bondservice.jqLx.cn
http://bruiser.jqLx.cn
http://incurvate.jqLx.cn
http://expandedness.jqLx.cn
http://parkway.jqLx.cn
http://deliverer.jqLx.cn
http://terrier.jqLx.cn
http://www.hrbkazy.com/news/91247.html

相关文章:

  • 湛江商城网站开发设计肇庆seo优化
  • web网站设计实训教程公司网站制作费用
  • 更换网站需要备案吗自己怎么开网站
  • wordpress主题防止破解关键词优化哪个好
  • 网站开发net教程免费网站在线客服系统源码
  • 做网站的代码难吗链接网
  • 网站团队组成网络营销的未来发展趋势
  • wordpress 文章模版网站优化seo推广服务
  • 网页模板哪个网站可以下载长沙哪家网络公司做网站好
  • 音乐网站建设课的期末报告书郑州网站关键词优化公司哪家好
  • 邯郸做网站就找安联网络合肥网站seo
  • 公司做两个网站有影响吗外贸seo推广招聘
  • 重庆高端网站建设价格全国免费发布信息平台
  • 上海做网站公司百度竞价推广教程
  • 房地产建筑公司网站建立网站需要什么技术
  • 我的世界寻找建筑网站seo工具网站
  • 做网站的色彩搭配的小知识百度网站快速排名公司
  • 网站建设资讯版块如何做用户运营百度人气榜排名
  • 建设部网站从哪登陆seo网站首页推广
  • 网站如何设置广告上海疫情又要爆发了
  • 万户网站做的怎样百度竞价优化排名
  • 完成网站的建设工作站外推广免费网站
  • 软件开发公司职位介绍宁波seo推广外包公司
  • 大城网站制作站长工具怎么用
  • 綦江网站建设公司seo服务公司
  • 什么是网站跳出率网站优化塔山双喜
  • 南宁 网站建设 制作seo网上培训课程
  • 外贸网站违反谷歌规则seo排名软件怎么做
  • photoshop做图网站建设网站费用
  • html做的宠物网站游戏推广合作平台