Untitled

 avatar
unknown
c_cpp
2 years ago
658 B
6
Indexable
#include <iostream>
#include <iomanip>
using namespace std;
int main() 
{
    int razmer = 10;
    cout << string(5 * razmer + 1, '-') << endl;
    cout << '|' << setw(3) << " " << '|';
    for (int i = 1; i <= razmer; i++)
    {
        cout << setw(3) << i << '|';
    }
    cout << endl;
    cout << string(5 * razmer + 1, '-') << endl;
    for (int i = 1; i <= razmer; i++)
    {
        cout << '|' << setw(3) << i << '|';
        for (int j = 1; j <= razmer; j++)
        {
            cout << setw(3) << i * j << '|';
        }
        cout << endl;
        cout << string(5 * razmer + 1, '-') << endl;
    }
    return 0;
}
Editor is loading...
Leave a Comment