/*
* @Author: anchen
* @Date: 2022-09-15 08:51:08
* @Last Modified by: anchen
* @Last Modified time: 2022-09-15 09:31:05
*/
#include <stdio.h>
#define PI 3.14159
int main() {
// int a , b , c;
// printf("\ninput a , b");
// scanf("%d,%d",&a,&b);
// printf("\nbefore exchange:a=%d b=%d\n",a,b);
// c = a ; a = b ; b = c;
// pritnf("after exchange:a = %d b = %d n",a,b);
return 0;
}
/*
* @Author: anchen
* @Date: 2022-09-15 09:31:29
* @Last Modified by: anchen
* @Last Modified time: 2022-09-15 09:32:17
*/
#include <stdio.h>
int main() {
char c1, c2;
c1 = getchar();
printf("%c,%d\n",c1,c2);
c2 = c1 +32;
printf("%c,%d\n",c2,c2);
return 0;
}
/*
* @Author: anchen
* @Date: 2022-09-15 09:35:36
* @Last Modified by: anchen
* @Last Modified time: 2022-09-15 09:39:13
*/
#include <stdio.h>
int main() {
int x , b0, b1, b2;//变量定义
printf("please input an interger x:");//提示用户输入一个整数
b2 = x/100;//用整除方法计算最高位
b1 = (x-b2*100)/10;//计算中间位
b0 = x % 10 ; // 用求余数法计算最低位
printf("bit2 = %d, bit1 = %d, bit0 = %d\n",b2,b1,b0);//输出结果
return 0;
}
/*
* @Author: anchen
* @Date: 2022-09-15 09:22:36
* @Last Modified by: anchen
* @Last Modified time: 2022-09-15 09:29:51
*/
#include <stdio.h>
#include <math.h>
int main() {
int a , b, c;
float s ,area;
scanf("%d ,%d,%d",&a,&b,&c);
s = 1.0/2 * (a+b+c);
area = sqrt(s*(s-a)*(s-b)*(s-c));
printf("area = %8.3f\n", area);
return 0;
}