C++编程02 Hello World课件讲义.pptxVIP

  • 1
  • 0
  • 约3.06千字
  • 约 23页
  • 2026-03-13 发布于广西
  • 举报

02HelloWorld!

学习目标1、熟悉编程环境2、了解程序结构3、学习和使用输出语句

知识讲授

运行一个小程序

准备工作helloworld includestreamnamespace

程序的框架#includeiostreamusingnamespacestd;intmain(){couthello,world;return0;}准备好工具和材料工具和材料的花名册开始做菜做菜的流程说明做完收工大括号内就是一个完整流程

输出语句cout字符串、表达式或值;

输出数字#includeiostreamusingnamespacestd;intmain(){ cout666; return0;}

输出字符#includeiostreamusingnamespacestd;intmain(){ coutW; return0;}

输出表达式#includeiostreamusingnamespacestd;intmain(){ cout5*(4+3); return0;}

输出字符串#includeiostreamusingnamespacestd;intmain(){ couthello,world; return0;}

输出多个值#includeiostreamusingnamespaces

文档评论(0)

1亿VIP精品文档

相关文档