常龙云
幼苗
共回答了12个问题采纳率:100% 举报
1.
#include
void main()
{
int a,b;
printf("请输入a的值");
scanf("%d",&a);
printf("请输入b的值");
scanf("%d",&b);
if(a>=0&&b>=0)
{
printf("整数变量a,b中存储的均为非负数");
}
else
{
printf("整数变量a,b中存储的存在负数");
}
}
2.
#include
#include
void main()
{
float x,y;
printf("请输入x的值:n");
scanf("%f",&x);
if(x-1&&x=2)
y=sqrt(2*x+3);
printf("y的值为%f",y);
}
已运行验证
1年前
5