Advertisement
Guest User

Untitled

a guest
Nov 19th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. setlocale(LC_ALL,"Russian");
  2. int arr[5][4];
  3. int n=0,i,j;
  4.  
  5.  
  6. for(i=0;i<5;i++)
  7. {
  8. for(j=0;j<4;j++)
  9. {
  10. arr[i][j] = rand()%10;
  11. if(rand()%2)
  12. arr[i][j] = -arr[i][j];
  13. }
  14. }
  15. for(i=0;i<5;i++)
  16. {
  17. for(j=0;j<4;j++)
  18. {
  19. printf("%d ",arr[i][j]);
  20. }
  21. printf("\n");
  22. }
  23. printf("\n");
  24. for(i=0;i<5;i++)
  25. {
  26. for(j=0;j<4;j++)
  27. {
  28. int otric=0;
  29. if (arr[i][j<0]);
  30. otric++;
  31. printf("%d,",otric);
  32. }
  33. }
  34.  
  35. return 0;
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement