Advertisement
hiker43

multiplicationtable

Aug 13th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.39 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. void multiplicationTable(int a,int b)
  4.     {
  5.         for (int i=1; i <=a; i++)
  6.         {
  7.             for(int j=1; j<=b; j++)
  8.                  std::cout<<i*j<<"\t";
  9.         }
  10.         std::cout<<"\n";
  11.     }
  12.  
  13.  
  14.  
  15. int main()
  16. {
  17.        int a, b;
  18.       std::cout<<"Enter two numbers:\t";
  19.       std::cin>>a>>b;
  20.       multiplicationTable(a,b);
  21.  
  22.  
  23.     return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement