1.double a,b;
cin>>a;
cin>>b;
if(a>b) cout<else if(a==b) cout<<"these numbers are equal";
else cout<
2.cout<<"Input three different intergers:";
int a,b,c;
cin>>a;
cin>>b;
cin>>c;
while(a==b||a==c||b==c)
{
cout<<"the numbers must be different,please input again:";
cin>>a;
cin>>b;
cin>>c;
}
cout<<"Sum is "<cout<<"Average is "<<(double)(a+b+c)/(double)3<
if(a{
if(a
sml=a;
if(b
}
else{sml=c;lag=b;}
}
else{
if(a
{
lag=a;
if(b>c) sml=c;
else sml=b;
}
}
cout<<"Smallest is "<
*
**
***
****
*****
4.
int num[5];
for(int i=0;i<5;i++)
{cin>>num[i];
}
int max=num[0],mark=0;
for(int i=1;i<5;i++)
{
if(num[i]>max) {max=num[i];mark=i;}
}
cout<<"第"<5.int a;
cin>>a;
if(a%2==0) cout<<"是偶数"<
你是在着急交作业吧,这些都是非常简单的题目,还是好好看看书吧,不要投机取巧
楼上第4题有一句写错了
cout<<"第"<