fork download
  1. #include <stdio.h>
  2.  
  3. int main() {
  4. int i,j,n;
  5. scanf("%d",&n);
  6. for(i=n;i>=1;i--){
  7. for(j=1;j<=i;j++){
  8. printf("%d",i%2);
  9. }
  10.  
  11. printf("\n");
  12. }
  13. return 0;
  14. }
  15.  
Success #stdin #stdout 0s 5312KB
stdin
5
stdout
11111
0000
111
00
1