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