fork download
  1. /*
  2.   Program to display multiplication table up-to 10
  3. */
  4.  
  5. #include <iostream>
  6. using namespace std;
  7.  
  8. int main()
  9. {
  10. int n;
  11. cout << "Enter a Positive interger: ";
  12. cin >> n;
  13.  
  14. for (int i = 1; i <= 10; ++i)
  15. {
  16. cout << n << " * " << i << " = " << n * i << endl;
  17. }
  18. return 0;
  19. }
Success #stdin #stdout 0.01s 5284KB
stdin
5
stdout
Enter a Positive interger: 5 * 1 = 5
5 * 2 = 10
5 * 3 = 15
5 * 4 = 20
5 * 5 = 25
5 * 6 = 30
5 * 7 = 35
5 * 8 = 40
5 * 9 = 45
5 * 10 = 50