fork download
  1.  
  2. #include <iostream>
  3.  
  4. using namespace std;
  5.  
  6. int a=0;
  7. int b=0;
  8. int c=0;
  9. int x=0;
  10.  
  11. int main()
  12. {
  13. cout << "Dumb Math Riddle Maker" << endl;
  14. cout << "this makes those dumb riddles like:" << endl;
  15. cout << "295 + 7 = 14162 ..\n";
  16.  
  17. cout << "Please enter a single digit between 1 and 9 \n";
  18. cin >> x;
  19. cout << "now enter another single digit between 1 and 9 \n";
  20. cin >> a;
  21. cout << "another between 1 and 9 please \n";
  22. cin >> b;
  23. cout << "just one more! \n";
  24. cin >> c;
  25. cout << x * a << x + a << x - a;
  26. return 0;
  27. }
Success #stdin #stdout 0s 4516KB
stdin
1
0
3
0
stdout
Dumb Math Riddle Maker
this makes those dumb riddles like:
295 + 7 = 14162 ..
Please enter a single digit between 1 and 9 
now enter another single digit between 1 and 9 
another between 1 and 9 please 
just one more! 
011