fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int n, i, multi;
  7. cin >> n;
  8. for(i=1; i<=10; i++){
  9. multi = n * i;
  10. cout << n << " * " << i << " = " << multi << '\n';
  11. }
  12. return 0;
  13. }
Success #stdin #stdout 0.01s 5276KB
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
2 * 10 = 20