Two methods, the first method:
#include <iostream.h>
#include <stdlib.h>
int main ()
{
int a,b,c;
for (int i=0;i<30;i++)
{
A=rand ()%100;//x+rand ()% (y-x+1) randomly generates integers in "x, Y"
B=rand ()%100;
C=rand ()%4;
Switch (c)
{
Case 1:
cout<<a<< "+" <<b<< "=" <<endl;
Break
Case 2:
cout<<a<< "-" <<b<< "=" <<endl;
Break
Case 3:
cout<<a<< "*" <<b<< "=" <<endl;
Break
Case 4:
cout<<a<< "/" <<b<< "=" <<endl;
Break
}
}
return 0;
}
The second method does not use the brain:
#include <iostream.h>
#include <stdlib.h>
int main ()
{
cout<< "1. 3/7X49/9-4/3 "<<endl;
cout<< "2.8/ 9X15/36 + 1/27 "<<endl;
cout<< "3. 12x5/6–2/9x3 "<<endl;
cout<< "4. 8X5/4 + "<<endl;
cout<< "5. 6÷3/8–3/8÷6 "<<endl
<< "6. 4/7X5/9 + 3/7X5/9 "<<endl
<< "7. 5/2-(3/2 + 4/5) "<<endl
<< "8. 7/8 + (1/8 + 1/9) "<<endl
<< "9. 9X5/6 + 5/6 "<<endl
<< "10. 3/4X8/9-1/3 "<<endl
<< "11. 7X5/49 + 3/14 "<<endl
<< "12. 6x (2/3) "<<endl
<< "13. 8X4/5 + 8X11/5 "<<endl
<< "14. 31X5/6–5/6 "<<endl
<< "15. 9/7-(2/7–10/21) "<<endl
<< "16. 5/9X18–14X2/7 "<<endl
<< "17. 4/5X25/16 + 2/3X3/4 "<<endl
<< "18. 14X8/7–5/6X12/15 "<<endl
<< "19. 17/32–3/4x9/24 "<<endl
<< "20. 3X2/9 + 1/3 "<<endl
<< "21. 5/7X3/25 + 3/7 "<<endl
<< "22. 3/14XX2/3 + 1/6 "<<endl
<< "23. 1/5X2/3 + 5/6 "<<endl
<< "24. 9/22 + 1/11÷1/2 "<<endl
<< "25. 5/3X11/5 + 4/3 "<<endl
<< "26. 45X2/3 + 1/3x15 "<<endl
<< "27. 7/19 + 12/19X5/6 "<<endl
<< "28. 1/4 + 3/4÷2/3 "<<endl
<< "29.8/ 7X21/16 + "<<endl
<< "30. 101x1/5–1/5x21 "<<endl;
return 0;
}
30-Way arithmetic