打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
1.52 数据类型与输入格式 练习
userphoto

2022.12.22 北京

关注
1.52 练习

> 在C99中,double的输入必须用%lf,输出必须用%f
>
> INF inifinity  无限大
>
> IND indeterminate  未定义

- 题目

![](https://img2020.cnblogs.com/blog/1883993/202103/1883993-20210309100550115-1488056317.png)



![](https://img2020.cnblogs.com/blog/1883993/202103/1883993-20210309100558587-2144257961.png)



- 代码

``` c
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
    // 在C99中,double的输入必须用%lf,输出必须用%f
    
    
    /*
    printf("%f\n",11111*11111);
    printf("%f\n",sqrt(-10));
    printf("%lf\n",sqrt(-10));
    printf("%d\n",sqrt(-10));
    printf("%lld\n",sqrt(-10));
    printf("%d\n",1.0/0.0);
    printf("%f\n",1.0/0.0);
    printf("%d\n",0.0/0.0);
    printf("%f\n",0.0/0.0);
    */
    //printf("%d\n",1/0);
    //printf("%f\n",1/0);
    //while(1){
  //       int a, b;
    //scanf("%d %d",&a, &b);
    //printf("%d %d\n",a, b);
   // }
    
    //-1.#IND00
    
    
    return 0;
}

  • 结果

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
二分法C编程实例
编译错误:“undefined reference to 'sqrt'
输入角度,求三角函数
do...while 和 while 的区别
时间函数clock()
梯形求积公式的逐次分半法(C语言实现)
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服