Advertisement
fryc1906

tabela_mnozenia

Mar 30th, 2016
321
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.61 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <sstream>
  4. using namespace std;
  5.  
  6. int main(){
  7.  
  8.     cout.width(10);
  9.     for(int i=1;i<=10;i++){
  10.         cout<<i;
  11.         cout.width(4);
  12.  
  13.     }
  14.     cout<<"\n";
  15.     cout.width(10);
  16.     for(int i=1;i<=10;i++){
  17.         cout.fill('_');
  18.         cout<<"_";
  19.         cout.width(4);
  20.  
  21.     }
  22.     cout.fill(' ');
  23.     cout<<"\n";
  24.     for(int i=1;i<=10;i++){
  25.             cout.width(3);
  26.             cout<<i<<" | ";
  27.         for(int j=1;j<=10;j++){
  28.             cout.width(4);
  29.             cout<<i*j;
  30.         }
  31.         cout<<"\n";
  32.     }
  33.  
  34.     return EXIT_SUCCESS;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement