Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- #include <ctime>
- using namespace std;
- class myClass {
- private:
- int a[4][3],i,j;
- public:
- void input() {
- }
- void process() {
- srand(time(NULL));
- for(i=0;i<4;i++) {
- for(j=0;j<3;j++) {
- a[i][j]=rand()%10;
- cout<<a[i][j]<<" ";
- }
- cout<<endl;
- }
- cout<<endl;
- for(i=0;i<3;i++) {
- for(j=0;j<4;j++) {
- //a[i][j]=rand()%10; aita na dilaw cholbe
- //instead of a[i][j] aikhane a[j][i] hobe.
- cout<<a[j][i]<<" ";
- }
- cout<<endl;
- }
- }
- };
- int main() {
- myClass c;
- c.input();
- c.process();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement