Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- unsigned int n;
- int i, j;
- char c, d;
- cin>>n>>c>>d;
- for(i=1;i<=n;i++){
- if (i%2==1){for(j=1;j<=n;j++){
- if(j%2==1) cout<<c;
- else cout<<d;}
- }
- else if (i%2==0){for(int k=1;k<=n;k++){
- if(k%2==1) cout<<d;
- else cout<<c;}
- }
- cout<<endl;}
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment