编程知识 cdmana.com

编写一个程序实现以下内容

img




采纳答案:
#include<stdio.h>void main(){    float x;    float y;    scanf("%f",&x);    // 1    y = 4.8*x-1/2;    printf("\n(1) y = %f",y);        // 2    y = (int)x%2/5-x;    printf("\n(2) y = %d",y);        // 3    y = x>100 && x<200;    printf("\n(3) y = %d",y);        // 4    y = x>=100 || x<=10;    printf("\n(4) y = %d",y);        // 5    y = (x-=x*100,x/100);    printf("\n(5) y = %f",y);}

版权声明
本文为[CSDN问答]所创,转载请带上原文链接,感谢
https://ask.csdn.net/questions/7522827

Scroll to Top