Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 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<6;i++)
  6. {
  7. cout<<t[i]<<endl;
  8. }
  9. }
  10.  
  11. void pokaz(float t[],int k)
  12. {
  13. for(int i=0;i<k;i++)
  14. {
  15. cout<<t[i]<<endl;
  16. }
  17. }
  18.  
  19. void pokaz(int tab1[3][4])
  20. {
  21. for(int a=0;a<3;a++)
  22. for(int b=0;b<4;b++)
  23. cout<<tab1[a][b];
  24. }
  25.  
  26. void pokaz(int **tab2,int h,int m)
  27. {
  28. for(int a=0;a<h;a++)
  29. for(int b=0;b<m;b++)
  30. cout<<tab2[a][b];
  31. }
  32.  
  33. main()
  34. {
  35. int n;
  36. int k;
  37. int a;
  38. int b;
  39. int tab1[3][4];
  40. cin>>k;
  41. int t[6]={0,1,2,3,4,5};
  42. float *tab= new float[k];
  43. for(int i=0;i<k;i++)
  44. cin>>tab[i];
  45.  
  46. for(int a=0;a<3;a++)
  47. for(int b=0;b<4;b++)
  48. tab1[a][b]=a*b;
  49. int h;
  50. int m;
  51. int **tab2=new int*[h];
  52.  
  53.  
  54. for(int r=0;r<h;r++)
  55. {
  56. tab2[r]=new int[m];
  57. for(int y=0;y<m;y++)
  58. cin>>tab2[r][y];
  59. }
  60. pokaz(h,m,tab2);
  61.  
  62. pokaz(t);
  63. pokaz(tab,k);
  64. pokaz(tab1);
  65. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement