Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- void imie()
- {
- cout<<"Napisane przez: Adam Arasimowicz"<<endl;
- }
- void algorytm()
- {
- cout<<"dwuwymiar"<<endl;
- }
- int main()
- {
- imie();
- algorytm();
- int i,j,m,n;
- cout<<"podaj liczbe kolumn: ";
- cin>>n;
- cout<<"podaj liczbe wierszy: ";
- cin>>m;
- int tab[m][n];
- cout<<endl;
- for(i=0;i<m;i++)
- {
- for(j=0;j<n;j++)
- {
- if(j==0||i==j)
- {
- tab[i][j]=1;
- cout<<tab[i][j];
- }
- else
- {
- tab[i][j]=0;
- cout<<tab[i][j];}
- }
- cout<<endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement