编写程序,输入变量x值和变量y的值,并分析输出结果(提示请正确选取x,y是实型变量还是整形变量)

[复制链接]
查看11 | 回复1 | 2009-8-21 18:43:31 | 显示全部楼层 |阅读模式
x
回复

使用道具 举报

千问 | 2009-8-21 18:43:31 | 显示全部楼层
y=2.4x-1/2#include "stdio.h"void main(){float x,y; scanf("%f",&x); y=2.4*x-1.0/2.0; printf("%f",y);
} y=x%2/5-x#include "stdio.h"void main(){ float x,y; scanf("%f",&x); y=(int)x%(int)2/5.0-x; printf("%f",y);
}
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行