首页 > 其他 > 详细

程序清单2.1_first.c程序_《C Primer Plus》P15

时间:2018-05-29 23:31:53      阅读:328      评论:0      收藏:0      [点我收藏+]
// first.cpp : 定义控制台应用程序的入口点。 // /* 时间:2018年05月29日 22:49:40 代码:程序清单2.1_first.c程序_《C Primer Plus》P15 目的:进一步了解 printf()函数,定义变量与赋值 及 (\n)含义 */ #include "stdafx.h" int _tmain(int argc, _TCHAR* argv[]) /* 一个简单的 C 程序 */ { int num; /* 定义一个名为 num 的变量 */ num = 1; /* 为 num 赋一个值 */ printf("I am a simple "); /* 使用 printf() 函数 */ printf("computer.\n"); // 我最喜欢的号码是1,因为它是第一位的。 printf("My favorite number is %d because it is first.\n", num); getchar(); return 0; } /* 在VS2010中运行结果: --------------------------------------------- I am a simple computer. My favorite number is 1 because it is first. --------------------------------------------- */

程序清单2.1_first.c程序_《C Primer Plus》P15

原文:http://blog.51cto.com/13555061/2121803

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!