zoukankan      html  css  js  c++  java
  • 浮点数

    #include<stdio.h>
    int main()
    {
        double a,b,c,d;
        a=6+5/4-2;
        b=2+2*(2*2-2)%2/3;
        c=10+9*((8+7)%6)+5*4%3*2+3;
        d=1+2+(3+4)*((5*6%7/8)-9)*10;
        //scanf("6+5/4-2",&a);
        printf("%lf %lf %lf %lf",a,b,c,d);
        return 0;
    }

    5.000000 2.000000 44.000000 -627.000000    双精度输出

    #include<stdio.h>
    int main()
    {
        int a,b,c,d;
        a=6+5/4-2;
        b=2+2*(2*2-2)%2/3;
        c=10+9*((8+7)%6)+5*4%3*2+3;
        d=1+2+(3+4)*((5*6%7/8)-9)*10;
        printf("%d %d %d %d",a,b,c,d);
        return 0;
    }

    5 2 44 -627

  • 相关阅读:
    2020/3/12
    练习题1
    2020/3/26
    2020/3/25
    2020/3/24
    2020/3/23
    应用层
    bzoj3326[SCOI2013]数数
    HEOI2017游记
    bzoj4417[SHOI2013]超级跳马
  • 原文地址:https://www.cnblogs.com/lijianmin6/p/10315635.html
Copyright © 2011-2022 走看看