Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- int main()
- {
- int n,m,k,a[50][50],x,y,i,j,s,l;
- ifstream fin("salut lipseste baluta.in");
- ofstream fout("salut lipseste baluta.out");
- fin>>n;
- fin>>m;
- fin>>k;
- for(i=1;i<=n;i++)
- for(j=1;j<=n;j++)
- a[i][j]=0;
- for(i=1;i<=m;i++)
- {
- cout<<"x="; cin>>x;
- cout<<"y="; cin>>y;
- a[x][y]=1;
- a[y][x]=1;
- }
- for(i=1;i<=n;i++)
- {
- for(j=1;j<=n;j++)
- {
- cout<<a[i][j]<<" ";
- }
- cout<<endl;
- }
- cout<<endl;
- cout<"l="; cin>>l;
- for(i=1;i<=1;i++)
- {
- fin>>k[i];
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement