C语言如何使用print语句

更新时间:02-10 教程 由 念旧 分享

C语言如何使用print语句?

需要准备的材料分别有:电脑、C语言编译器。

1、首先,打开C语言编译器,新建一个初始.cpp文件,例如:test.cpp。

2、在test.cpp文件中,输入C语言代码:

int a = 6;double b = 3.14;char *c = "hello";printf("%d%lf%s", a, b, c);

3、编译器运行test.cpp文件,此时成功使用print语句打印了整数、浮点数、字符串。

声明:关于《C语言如何使用print语句》以上内容仅供参考,若您的权利被侵害,请联系13825271@qq.com
本文网址:http://www.25820.com/tutorial/14_2314852.html