摘要:
unsigned short int *page=&myage; 阅读全文
摘要:
ushort myage;
ushort *page=0;
myage=5;
cout"myage: "myageendl;
page=&myage; //将&myage的地址给page
cout"*page: "*pageendlendl; 阅读全文
摘要:
unsigned short shortvar=5;
unsigned long longvar=65535;
long svar=-65535;
cout"shortvar:\t"shortvar;
cout"\taddress of shortvar:\t";
cout&shortvarendl; 阅读全文
摘要:
#includeusing namespace std;enum choice{ drawrect=1, getarea, getperim, changedimensions, quit};class rectangle{public: rectangle(int width,int height); ~rectangle(); int getheight()const{return i... 阅读全文
摘要:
for(;;)
{
if(countermax)
{
cout"hello!"endl;
counter++;
} 阅读全文
摘要:
int counter=0;
for(;counter5;)//等同 for(counter=0;counter5;counter++)
{
counter++;
cout"looping\n";
} 阅读全文
摘要:
for(int i=0,j=0;i3;i++,j++)
cout"i "i"j "jendl; 阅读全文
摘要:
for (counter=0;counter5;counter++)
cout"loop! "; 阅读全文
摘要:
do
{
cout0); 阅读全文
摘要:
while(true)
{
counter++;
if(counter>10)
break;
}
阅读全文
摘要:
while(smalllarge&&smallMAXSMALL)
{
small++;
if(small%skip==0)
{
cout"skipping on "smallendl;
continue;//跳到循环的开通
}
if(large==target)
{
cout"targer reached!";
break; 阅读全文
摘要:
生活的理想,就是为了理想的生活。 —— 张闻天 当你的希望一个个落空,你也要坚定,要沉着! —— 朗费罗 希望是厄运的忠实的姐妹。 —— 普希金 辛勤的蜜蜂永没有时间悲哀。 —— 布莱克 生活就是战斗。 —— 柯罗连科 自我控制是最强者的本能。 —— 萧伯纳 事业常成于坚忍,毁于急躁。 —— 萨迪 要成就一件大事业,必须从小事做起。... 阅读全文
摘要:
转载 好漂亮的图片,不知道怎么做哦 阅读全文
摘要:
while(smalllarge&&smallMAXSMALL){
if(small%5000==0)
cout".";
small++;
large-=2;
} 阅读全文
摘要:
while(counter5)
{
counter++;
cout"counter is "counterendl;
} 阅读全文
摘要:
struct student {
int num;
char name[20];
float grade;
}; 阅读全文
摘要:
fprintf(stdout,"ch str\n");
fscanf(stdin,"%c %s",&ch,str); 阅读全文
摘要:
#include 只有一个头文件 Read error 阅读全文
摘要:
#include
const double HD=3.1415926/180;
void main() {
cout"x\tsin(x)"endl;
for (int i=0;i=180;i=i+30)
couti"\t"sin(i*HD)endl; 阅读全文
摘要:
#define YES 1
#define PI 3.1415926
#define RAD PI/180
#define MESG "This is a string." 阅读全文
摘要:
#define MAX(a,b) ((a)>(b) ? (a):(b)) 阅读全文
摘要:
#define PI 3.1416
#if 1
cout"i="iendl;
#endif 阅读全文
摘要:
400 主板 + 显卡 +声卡 200 内存 400 处理器 350 硬盘 200 电源 1600 阅读全文
摘要:
#include using namespace std; float convert(float); void main() { float tempfer,tempcel; cout>tempfer; tempcel=convert(tempfer); cout<<"输出" <<tempcel; cout<<"hello world"; } float convert(float tempf... 阅读全文
摘要:
#include using namespace std; int area(int a,int b); void main(){ int A,B,C; cin>>A; if(A>B; if(B) // 等价于 if(B!=0) cout<<"B is number.\n"; C=area(A,B); cout<<"A * B is " <<C; } int area(i... 阅读全文