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