Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <windows.h>
- #include <iomanip>
- using namespace std;
- HANDLE uchwyt = GetStdHandle(STD_OUTPUT_HANDLE);
- #define kolor SetConsoleTextAttribute(uchwyt,
- int main()
- {
- kolor 8);
- cout<<"*";
- kolor 6);
- cout<< " |";
- cout<<" "<<setw(2)<< "1";
- for(int i=2; i<16; i++)
- cout<<" | "<<setw(2)<< i;
- cout<<" |"<<endl;
- for(int i=1; i<80; i++)cout<<"-";
- cout<<endl;
- for(int i=1; i<11; i++)
- {
- kolor 6);
- cout<<setw(1)<<i;
- if(i==10)cout << "| ";
- else cout<<" | ";
- kolor 7);
- for(int j=1; j<16; j++)
- {
- if((i*j) < 100)
- {
- cout<<setw(3)<<i*j;
- kolor 6);
- cout<<" |";
- }
- else
- {
- cout << setw(4)<<i*j;
- kolor 6);
- cout<<"|";
- }
- kolor 7);
- }
- cout <<endl;
- kolor 6);
- for(int i=1; i<80; i++)
- cout<<"-";
- kolor 7);
- if(i<10)cout<<endl;
- }
- cin.get();
- }
Advertisement
Add Comment
Please, Sign In to add comment