Pattern 11
user_6679955
c_cpp
10 months ago
258 B
5
Indexable
void nBinaryTriangle(int n) {
for(int i=0;i<n;i++){
for(int j=0;j<=i;j++){
if(i%2==j%2){
cout<<1<<" ";
}
else{
cout<<0<<" ";
}
}
cout<<endl;
}
}Editor is loading...
Leave a Comment