Untitled

mail@pastecode.io avatar
unknown
c_cpp
7 months ago
658 B
3
Indexable
Never
#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;
}
Leave a Comment