下载此文档

c 教学ppt课件.ppt


文档分类:IT计算机 | 页数:约69页 举报非法文档有奖
1/69
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/69 下载此文档
文档列表 文档介绍
Copyright ? 2012 Pearson Education, Inc. Chapter 3: Expressions and Interactivity Copyright ? 2012 Pearson Education, Inc. The cin Object Copyright ? 2012 Pearson Education, Inc. The cin Object ? Standard input object ? Like cout , requires iostream file ? Used to read input from keyboard ? Information retrieved from cin with >> ? Input is stored in one or more variables Copyright ? 2012 Pearson Education, Inc. The cin Object in Program 3-1 Copyright ? 2012 Pearson Education, Inc. The cin Object ? cin converts data to the type that matches the variable: int height; cout << "How tall is the room? "; cin >> height; Copyright ? 2012 Pearson Education, Inc. Displaying a Prompt ? A prompt is a message that instructs the user to enter data. ? You should always use cout to display a prompt before each cin statement. cout << "How tall is the room? "; cin >> height; Copyright ? 2012 Pearson Education, Inc. The cin Object ? Can be used to input more than one value: cin >> height >> width; ? Multiple values from keyboard must be separated by spaces ? Order is important: first value entered goes to first variable, etc. Copyright ? 2012 Pearson Education, Inc. The cin Object Gathers Multiple Values in Program 3-2 Copyright ? 2012 Pearson Education, Inc. The cin Object Reads Different Data Types in Program 3-3 Copyright ? 2012 Pearson Education, Inc. Mathematical Expressions

c 教学ppt课件 来自淘豆网m.daumloan.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数69
  • 收藏数0 收藏
  • 顶次数0
  • 上传人yzhluyin1
  • 文件大小1.22 MB
  • 时间2017-02-17