????????????淶??д30??????????
/**
?????30??2??????????????
*/
#include <iostream.h>
#include <stdlib.h>
#include <conio.h>
int main()
{
//?????
int a??b??c;
int num1??num2;
int num;
int chufa;
int k??jiange;
int zhengchu;
int j=0;
int chengfa;
int con;
//???????????Χ???м?????????
cout<<"???????????Χ???м?????????";
cin>>num1>>num2;
if(num1>num2)
{
cout<<"??????????С????????????????";
cin>>num1>>num2;
}
//??????????????num
cout<<"???????????????????";
cin>>num;
if(num>(4*(num2-num1)^2))
{
cout<<"????????????????????????????????????????:";
cin>>num;
}
//??????
cout<<"??м??????м????????м???";
cin>>k>>jiange;
if(jiange>=5||jiange<0)
{
cout<<"??????????????????????????";
cin>>jiange;
}
//????????
cout<<"????????????????1????????0??";
cin>>chufa;
if(chufa==1)
{
cout<<"??????????????????1??????0??";
cin>>zhengchu;
}
//???????
cout<<"???????????????1????????0??";
cin>>chengfa;
cout<<endl;
for(int i=0;i<num;i++)
{
cout<<i+1<<"??";
a=(rand()%(num2-num1+1))+num1;
b=(rand()%(num2-num1+1))+num1;
if(chufa==1)
{
if(chengfa==1)
{
c=rand()%4;//0-3
}
else
{
c=rand()%3;//0-2
}
}
else
{
if(chengfa==1)
{
c=rand()%3+1;//1-3
}
else
{
c=rand()%2+1;//1-2
}
}
switch (c)
{
case 1:
cout<<a<<"+"<<b<<"="<<" ";
break;
case 2:
if(a>b)
{
cout<<a<<"-"<<b<<"="<<" ";
}
else
{
cout<<b<<"-"<<a<<"="<<" ";
}
break;
case 3:
cout<<a<<"*"<<b<<"="<<" ";
break;
case 0://????
if(zhengchu==1)//??????
{
if(b==0)
{
cout<<b<<"/"<<a<<"="<<" ";
}
else
{
cout<<a<<"/"<<b<<"="<<" ";
}
}
else
{
while((j<100000)&&(a!=0)&&(b!=0)&&(a%b==0))
{
cout<<a<<"/"<<b<<"="<<" ";
j++;
}
if((a!=0)&&(b!=0)&&(a%b==0))
{
cout<<a<<"/"<<b<<"="<<" ";
//i++;
}
else
{
int j=0;
while(j<100000)
{
a=(rand()%(num2-num1+1))+num1;
b=(rand()%(num2-num1+1))+num1;
if((a!=0)&&(b!=0)&&(a%b==0))
{
cout<<a<<"/"<<b<<"="<<" ";
//i++;
j=100000;
j++;
}
else
{
j++;
}
}
}
}
break;
}
if((i+1)%k==0)
{
cout<<endl;
for(int m=0;m<jiange;m++)
{
cout<<endl;
}
}
}
//??????
cout<<"????????????1????????0??"<<endl;
cin>>con;
if(con==1)
{
cout<<endl;
main();
}
else
{
return 0;
}
getch();
return 0;
}