摘要: 1:代码如下: // 2.12.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include<iostream> using namespace std; void main() { int i=5,j=8,k=12,l=4,x1,x2; x1=i>j&& 阅读全文
posted @ 2017-09-11 16:43 一串字符串 阅读(778) 评论(0) 推荐(0) 编辑
摘要: 1:代码如下: // 2.11.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include <iostream> using namespace std; void main() { float x=20,y=-400.00; cout << x <<' 阅读全文
posted @ 2017-09-11 16:27 一串字符串 阅读(205) 评论(0) 推荐(0) 编辑
摘要: 1:代码如下: // 2.10.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include <iostream> using namespace std; void main() { int x=123; double y=-3.1415; cout < 阅读全文
posted @ 2017-09-11 15:59 一串字符串 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 1:代码如下: #include "stdafx.h" #include <iostream> #include <iomanip> using namespace std; void main() { int i = 0x2F, j = 255;//0x代表16进制, cout << i << e 阅读全文
posted @ 2017-09-11 15:42 一串字符串 阅读(528) 评论(0) 推荐(0) 编辑
摘要: 1:代码如下: // 2.8.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include <iostream> #include <iomanip> using namespace std; void main() { int b=123456; //对 阅读全文
posted @ 2017-09-11 15:31 一串字符串 阅读(412) 评论(0) 推荐(0) 编辑
摘要: 1:代码如下: // 2.7.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include <iostream> #include <iomanip> using namespace std; void main() { double a=123.4567 阅读全文
posted @ 2017-09-11 10:03 一串字符串 阅读(305) 评论(0) 推荐(0) 编辑
摘要: 1:代码如下: // 2.6.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include <iostream> using namespace std; void main() { int i=0; cout << i<< endl; cout << " 阅读全文
posted @ 2017-09-11 09:51 一串字符串 阅读(565) 评论(0) 推荐(0) 编辑
摘要: 1:代码如下: // 2.5.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" int main() { long iLong; /*长整型变量*/ short iShort; /*短整型变量*/ int iNumber1=1; /*整型变量,为其赋值为1*/ 阅读全文
posted @ 2017-09-11 09:45 一串字符串 阅读(615) 评论(0) 推荐(0) 编辑
摘要: 1:puts函数可以输出提示信息的字符串。 2:代码如下: // 2.4.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" int main() { int iInt1,iInt2; /*定义两个整型变量*/ puts("请输入两个数字"); /*通过puts函 阅读全文
posted @ 2017-09-11 09:19 一串字符串 阅读(684) 评论(0) 推荐(0) 编辑
摘要: 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) 编辑
摘要: 1:首先参看代码: #include "stdafx.h" #include "iostream" using namespace std; class A { private: int value; public: A(int n) { value=n; } //A(A other)!!这是错误的 阅读全文
posted @ 2017-09-06 17:27 一串字符串 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 1:首先,根据课本上的程序,是这样的: #include "stdafx.h" #include "iostream" using namespace std; int StrToInt(char* string); int StrToInt(char* string) { int number=0 阅读全文
posted @ 2017-09-05 20:50 一串字符串 阅读(244) 评论(0) 推荐(1) 编辑
摘要: 1:采集txt文件中的数据测试程序如下: #include "stdafx.h" #include <fstream> #include "iostream" using namespace std; int main(int argc, char* argv[]) { FILE *fp; floa 阅读全文
posted @ 2017-07-23 13:04 一串字符串 阅读(768) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2016-12-11 16:49 一串字符串 阅读(7) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2016-11-29 10:42 一串字符串 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 1:语言变换,下载Vistalizator ,详细的方法点击:方法见。需要安装语言包,语言包地址请点击:语言包。 阅读全文
posted @ 2016-10-19 00:17 一串字符串 阅读(207) 评论(0) 推荐(0) 编辑
摘要: 1:代码如下: 运行结果: 阅读全文
posted @ 2016-09-13 10:58 一串字符串 阅读(2449) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2016-08-24 15:17 一串字符串 阅读(5) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2016-08-23 09:57 一串字符串 阅读(5) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2016-08-11 16:49 一串字符串 阅读(8) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2016-08-02 00:32 一串字符串 阅读(5) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2016-07-29 20:27 一串字符串 阅读(4) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2016-07-13 20:19 一串字符串 阅读(8) 评论(0) 推荐(1) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2016-07-07 16:36 一串字符串 阅读(4) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2016-07-06 21:56 一串字符串 阅读(8) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2016-07-02 21:41 一串字符串 阅读(5) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2016-06-28 19:56 一串字符串 阅读(5) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2016-06-13 14:39 一串字符串 阅读(5) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2016-06-12 12:27 一串字符串 阅读(25) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2016-06-10 19:35 一串字符串 阅读(21) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2016-06-10 11:36 一串字符串 阅读(9) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2016-06-09 15:08 一串字符串 阅读(4) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2016-06-06 19:45 一串字符串 阅读(17) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2016-06-06 16:11 一串字符串 阅读(4) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2016-06-05 14:59 一串字符串 阅读(7) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2016-06-05 14:40 一串字符串 阅读(3) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2016-06-03 19:27 一串字符串 阅读(7) 评论(0) 推荐(0) 编辑