/*lx2_1.c输入两个整形数想,x,y之和、差、积、、x/y的商和余数*/ #include
int x,y;
printf(\scanf(\printf(\printf(\printf(\printf(\printf(\
}
/*lx2_2.c按下列要求编写程序,对变量a,b,c进行unsigned int型说明,将65赋给a,66赋给b,67赋给c,对变量a,b,c用%c格式输出显示*/ #include \main()
{ unsigned int a,b,c; a=65; b=66; c=67;
printf(\
}
/*lx2_3.c输入三角形三条边长,求三角形面积*/ #include
{ int a,b,c; double area,s;
printf(\ scanf(\ s=(double)(a+b+c)/2; area=sqrt(s*(s-a)*(s-b)*(s-c)); printf(\}
/*lx2_4.c已知半径r=3.4cm,求圆的周长和面积(保留2位小数)*/ #include
printf(\园周长=%.2f\\n\printf(\园面积=%.2f\\n\
}
/*lx2_5.c编写b取35.425,c取52.954,将b+c变为整数赋给a1,对b、c取整后求其和的程序*/ #include
int a1,a2; float b,c; b=35.425; c=52.954; a1=(int)(b+c); a2=(int)b+(int)c; printf(\ printf(\}
/*lx2_6.c编写a为100,b为50,若a>b成立将a赋予c,否则将b赋予c。同时,若a main( ) {
int a=100,b=50,c,d;
c=((a>b)?a:b); d=((a
/*lx2_7.c输入3个字符型数据,将其转换成相应的整数后,求它们的平均值并输出*/ #include
/*lx2_8.c设a的值为12,b的值为18,c的值为12,求a&&b,a||b,a&&c计算结果的值*/ #include
int a=12,b=18,c=12; float x;
printf(\scanf(\x=(a+b+c)/3.0;
printf(\