Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Multiplication Table
- //Olivia Pagach pd2A
- //November2 2017
- #include <iostream>
- #include <cmath>
- #include <iomanip>
- using namespace std;
- int getInput ()
- {
- cout<<"Where do you want the multiplication table to stop?"<<endl;
- int x;
- cin>>x;
- return x;
- }
- int main ()
- {
- int x= getInput ();
- for (int i = 1; i<= x; i++)
- {
- for(int j = 1; j <= x; j++)
- {
- cout <<setw(5)<< j * i << '\t';
- }
- cout << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement