编写程序,输入变量x的值,输出变量y的值,并分析输出结果y=x>10&&x<100
来源:百度知道 编辑:UC知道 时间:2024/06/06 19:41:48
#include "iostream.h"
void func(int &a,int b);
int main()
{
int x,y;
cout<<"输入两个数:"<<endl;
cin>>x>>y;
func(x,y);
return 0;
}
void func(int &a,int b)
{
b=a;
if(b>10&&b<100)cout<<"10<"<<b<<"<100";
if(b<=10) cout<<b<<'<='<<10<<endl;
if(b>=100)cout<<b<<">=100"<<endl;
return;
}