Advertisement
Guest User

Untitled

a guest
Jul 2nd, 2015
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <ctime>
  4. using namespace std;
  5. class myClass {
  6.  
  7. private:
  8. int a[4][3],i,j;
  9.  
  10. public:
  11.  
  12. void input() {
  13.  
  14. }
  15. void process() {
  16.  
  17. srand(time(NULL));
  18.  
  19. for(i=0;i<4;i++) {
  20. for(j=0;j<3;j++) {
  21. a[i][j]=rand()%10;
  22.  
  23. cout<<a[i][j]<<" ";
  24. }
  25. cout<<endl;
  26. }
  27. cout<<endl;
  28.  
  29. for(i=0;i<3;i++) {
  30. for(j=0;j<4;j++) {
  31.  
  32. //a[i][j]=rand()%10; aita na dilaw cholbe
  33.  
  34.  
  35. //instead of a[i][j] aikhane a[j][i] hobe.
  36.  
  37. cout<<a[j][i]<<" ";
  38. }
  39. cout<<endl;
  40. }
  41. }
  42. };
  43. int main() {
  44. myClass c;
  45. c.input();
  46. c.process();
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement