摘要:
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&& 阅读全文
摘要:
1:代码如下: // 2.11.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include <iostream> using namespace std; void main() { float x=20,y=-400.00; cout << x <<' 阅读全文
摘要:
1:代码如下: // 2.10.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include <iostream> using namespace std; void main() { int x=123; double y=-3.1415; cout < 阅读全文
摘要:
1:代码如下: #include "stdafx.h" #include <iostream> #include <iomanip> using namespace std; void main() { int i = 0x2F, j = 255;//0x代表16进制, cout << i << e 阅读全文
摘要:
1:代码如下: // 2.8.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include <iostream> #include <iomanip> using namespace std; void main() { int b=123456; //对 阅读全文
摘要:
1:代码如下: // 2.7.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include <iostream> #include <iomanip> using namespace std; void main() { double a=123.4567 阅读全文
摘要:
1:代码如下: // 2.6.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include <iostream> using namespace std; void main() { int i=0; cout << i<< endl; cout << " 阅读全文
摘要:
1:代码如下: // 2.5.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" int main() { long iLong; /*长整型变量*/ short iShort; /*短整型变量*/ int iNumber1=1; /*整型变量,为其赋值为1*/ 阅读全文
摘要:
1:puts函数可以输出提示信息的字符串。 2:代码如下: // 2.4.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" int main() { int iInt1,iInt2; /*定义两个整型变量*/ puts("请输入两个数字"); /*通过puts函 阅读全文