P201821430029

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

1.了解

#include <stdio.h>
int main()
{
 int a,b sum;
 a=123;
 b=456;
 sum=a+b;
 printff("sum is %d\n",sum);
 return 0;
}

2.分析

 

97,98在字符中对应a,b;

char为字符型,一个字节,最多表示127

197,198溢出,会误判为59,58的负数

3.编写

#include <stdio.h>

#include <math.h>

int main()

{

   double  x,y,z;  

  scanf("%lf=%lf",&x,&y);

  z=x+1/fabs(y);  

  printf("整型=%d浮点=%15f指数=%e\n",(int)z,z,z);

  return 0;  

}

posted on 2019-04-11 15:06  P201821430029  阅读(99)  评论(0编辑  收藏  举报