摘要: 1:代码如下: // 2.3.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" int main() { long iLong=100000; /*定义长整型变量,为其赋值*/ printf("the Long is %ld\n",iLong); /*输出长整型 阅读全文
posted @ 2017-09-08 15:41 一串字符串 阅读(886) 评论(0) 推荐(0) 编辑
摘要: 1:使用printf函数对不同类型变量进行输出,%符号,代表输出类型,\n代表换行,代码如下: // 2.2.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" int main() { int iInt=10; /*定义整型变量*/ char cChar='A' 阅读全文
posted @ 2017-09-08 15:17 一串字符串 阅读(1094) 评论(0) 推荐(0) 编辑
摘要: 1:代码如下: // 2.1.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" void main() { float eps = 0.0000001;//定义0的精度 float fvar = 0.00001; if (fvar >= -eps && fvar 阅读全文
posted @ 2017-09-08 15:09 一串字符串 阅读(318) 评论(0) 推荐(0) 编辑