Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.06 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. void pokaz(int t[],int n=6)
  4. {
  5.     for(int i=0;i<n;i++)
  6.     {
  7.         cout<<t[i];
  8.     }
  9. }
  10. float pokaz(float tab[], float k)
  11. {
  12.         for(int i=0;i<k;i++)
  13.     {
  14.        
  15.         cout<<tab[i];
  16.     }
  17. }
  18. float pokaz(float tab1[3][4])
  19. {
  20.         for(int j=0;j<3;j++)
  21.     {
  22.         for(int b=0;b<4;b++)
  23.         {
  24.         cout<<tab1[j][b];
  25.         }cout<<endl;
  26.        
  27.     }
  28. }
  29. float pokaz(int m, int p, int** tab2)
  30. {
  31.         for(int c=0;c<p;c++)
  32.     {
  33.         for(int d=0;d<m;d++)
  34.         {
  35.         cout<<tab2[c][d];
  36.         }cout<<endl;
  37.        
  38.     }
  39. }
  40. main()
  41. {
  42.     int t[6]={0,1,2,3,4,5};
  43.     int n=6, k;
  44.     cin>>k;
  45.     float *tab=new float[k];
  46.     for(int i=0;i<k;i++)
  47.     {
  48.         cin>>tab[i];
  49.     }
  50.     float tab1[3][4];
  51.     for(int j=0;j<3;j++)
  52.     {
  53.         for(int b=0;b<4;b++)
  54.         {
  55.         tab1[j][b]=j*b;
  56.         }
  57.     }cout<<endl;
  58.    
  59.     int p=1,m=1;
  60.     cout<<endl;
  61.     cin>>p>>m;
  62.     int **tab2=new int *[m];
  63.         for(int c=0;c<p;c++)
  64.     {
  65.         tab2[c]=new int
  66.         [p];
  67.         for(int d=0;d<m;d++)
  68.         {
  69.         cin>>tab2[c][d];
  70.         }cout<<endl;
  71.        
  72.     }
  73.  
  74.    
  75.     cout<<" ";
  76.     pokaz(t,n);
  77.     cout<<endl;
  78.     pokaz(tab,k);
  79.     cout<<endl;
  80.     pokaz(tab1);
  81.     cout<<endl;
  82.     pokaz(p,m,tab2);
  83. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement