Answer to Question #179084 in C++ for movs

Question #179084

Make a C++ program that will print the multiplication table using nested loop.


1
Expert's answer
2021-04-11T06:17:08-0400
#include <iostream>
#include <iomanip>
using namespace std;

int main() {
    cout << "   ";

    for (int i=1; i<10; i++) 
        cout << setw(2) << i << " ";
    cout << endl;
    cout << "   ";
     for (int i=1; i<10; i++) 
        cout << "---";
    cout << endl;

    for (int i=1; i<10; i++) {
        cout << i << ": ";
        for (int j=1; j<10; j++) 
            cout << setw(2) << i*j << " ";
        cout << endl;
    }
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS