# iPhone第二天之C基础

int i = 5;

int b = i++;

int c = i;

printf("b = %d\n",b);

printf("c = %d\n",c);

int a = ++i + (b++);

printf("a = %d\n",a);

printf("b = %d\n",b);

int d = i+b;

printf("d = %d\n",d);

printf("**********************\n");

int z=1;

int j =z++;

//j=1  z=2

printf("z = %d",z);

printf("j = %d\n",j);

j = ++z;

//j=3  z=3

printf("z = %d",z);

printf("j = %d\n",j);

j = z--;

//j=3  z=2

printf("z = %d",z);

printf("j = %d\n",j);

j = --z;

//j=1  z=1

printf("z = %d",z);

printf("j = %d\n",j);

printf("**********************\n");

printf("**********************\n");

i = 0;

if(i){

printf("true\n");

}else{

printf("false\n");

}

printf("**********************\n\n\n\n\n");

printf("**********************\n\n\n\n\n");

a = 8;

b = 4;

c = 1;

int max = 0;

if(a>b){

if(a>c){

max = a;

}else{

max = c;

}

}else{

if(b

max = c;

}else{

max = b;

}

}

printf("最大：%d\n",max);

printf("**********************\n\n\n");

switch语句

printf("**********************\n\n\n");

printf("请输入：");

case 'A':

printf("90-100\n");

break;

case 'B':

printf("80-90\n");

break;

case 'C':

printf("70-80\n");

break;

default:

printf("请重新输入输入：\n");

break;

}

printf("**********************\n\n\n");

• 博文量
3
• 访问量
1231