View difference between Paste ID: 3Qb8apqA and W4n7UzYG
SHOW: | | - or go back to the newest paste.
1
#include <iostream>
2
#include <windows.h>
3
#include <iomanip>
4
using namespace std;
5
HANDLE uchwyt = GetStdHandle(STD_OUTPUT_HANDLE);
6
#define kolor SetConsoleTextAttribute(uchwyt,
7-
int main(){kolor 8);cout<<"*";kolor 6);cout<< " |";
7+
int main()
8-
    cout<<"  "<<setw(2)<<  "1";for(int i=2;i<16;i++)
8+
{
9-
cout<<" | "<<setw(2)<<  i;cout<<" |"<<endl;
9+
    kolor 8);
10-
for(int i=1;i<80;i++)cout<<"-";cout<<endl;
10+
    cout<<"*";
11-
    for(int i=1;i<11;i++){kolor 6);cout<<setw(1)<<i;
11+
    kolor 6);
12-
            if(i==10)cout << "| ";else cout<<" | ";kolor 7);
12+
    cout<< " |";
13-
            for(int j=1;j<16;j++){if((i*j) < 100){
13+
    cout<<"  "<<setw(2)<<  "1";
14-
                    cout<<setw(3)<<i*j;kolor 6);cout<<" |";}else{
14+
    for(int i=2; i<16; i++)
15-
                    cout << setw(4)<<i*j;kolor 6);cout<<"|";}kolor 7);}
15+
    cout<<" | "<<setw(2)<<  i;
16-
            cout <<endl;kolor 6);for(int i=1;i<80;i++)
16+
    cout<<" |"<<endl;
17-
                cout<<"-";kolor 7);if(i<10)cout<<endl;}cin.get();}
17+
    for(int i=1; i<80; i++)cout<<"-";
18
        cout<<endl;
19
        for(int i=1; i<11; i++)
20
        {
21
            kolor 6);
22
            cout<<setw(1)<<i;
23
            if(i==10)cout << "| ";
24
                else cout<<" | ";
25
                    kolor 7);
26
                    for(int j=1; j<16; j++)
27
                    {
28
                        if((i*j) < 100)
29
                            {
30
                                cout<<setw(3)<<i*j;
31
                                kolor 6);
32
                                cout<<" |";
33
                            }
34
                            else
35
                            {
36
                                cout << setw(4)<<i*j;
37
                                kolor 6);
38
                                cout<<"|";
39
                            }
40
                            kolor 7);
41
                        }
42
                cout <<endl;
43
                kolor 6);
44
                for(int i=1; i<80; i++)
45
                cout<<"-";
46
                kolor 7);
47
                if(i<10)cout<<endl;
48
                }
49
cin.get();
50
}