Advertisement
Guest User

Untitled

a guest
Nov 15th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main()
  5. {
  6. int i, j, k, cos;
  7. int array[17][17] = {0};
  8. for(cos = 0; cos < 9; cos++){
  9. for(i = cos; i < 17-cos; i++){
  10. for(j = cos; j < 17-cos; j++){
  11. array[i][j] = cos+1;
  12. }
  13. }
  14. }
  15. for (i = 1; i < 17; i++){
  16. for(j = 0; j < 17; j++){
  17. printf("%d ", array[i][j]);
  18. }
  19. printf("\n");
  20. }
  21. return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement