for(m=0;m<=30;m++)
for(n=0;n<=30;n++)
if(m*2+n*4==90&&m+n==30)
cout<<"鸡:"<<m<<"兔:"<<n<<endl;
}
5、
#include "iostream.h"
void main()
{Eoat e=1,t=1;
int n;
for(n=1;1/t>1e-6;n++)
{t=t*n;
e=e+1/t;
}
cout<<"e="<<e<<endl;
}
6、
#include "iostream.h"
void main()
{int x,y;
for(x=1;x<=100;x++)
for(y=1;y<=100;y++)
if(x*x+2*x==y*y*y)
cout<<"x="<<x<<",y="<<y<<endl;
}
7、
#include
"iostream.h"
#include "stdio.h"
void main()
{char ch;
while((ch=getchar())!='.')
if(ch==' ')
cout<<end
l;
else
cout<<ch;
}
8、