fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main(void)
  6. {
  7. int n;
  8. cin >> n;
  9.  
  10. for(int i = 1; i < 10; i++)
  11. cout << n << " * " << i << " = " << n * i << endl;
  12.  
  13. return 0;
  14. }
Success #stdin #stdout 0s 4432KB
stdin
2
stdout
2 * 1 = 2
2 * 2 = 4
2 * 3 = 6
2 * 4 = 8
2 * 5 = 10
2 * 6 = 12
2 * 7 = 14
2 * 8 = 16
2 * 9 = 18