Advertisement
vallec

Untitled

Sep 3rd, 2023
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <math.h>
  3.  
  4. int main()
  5. {
  6. printf("Da se sustavi programa za obrabotka na masiva A[10, 10], kudeto dannite sa chisla v intervala [0;99]. Programata da izvurshi slednite deistviq:\n");
  7. printf("Da se smenqt mestata na redovete sudurjashti maksimalniq i minimalniq element na matricata.\n");
  8. printf("Avtor: ..........\n");
  9.  
  10. int M;
  11. printf("M = ");
  12. scanf("%d", &M);
  13. int A[M][M];
  14.  
  15.  
  16. for(int i = 0; i < M; i++){
  17. for(int j = 0; j < M; j++){
  18. printf("A[%d][%d] = ", i, j);
  19. int number = 0;
  20. scanf("%d", &number);
  21. while(number < 0 || number > 99){
  22. printf("Vavedi chislo v intervala [0;99]\n");
  23. printf("A[%d][%d] = ", i, j);
  24. scanf("%d", &number);
  25. }
  26.  
  27. A[i][j] = number;
  28. }
  29. }
  30.  
  31. printf("---------------\n");
  32.  
  33. for(int i = 0; i < M; i++){
  34. for(int j = 0; j < M; j++){
  35. printf("A[%d][%d] = %d\n", i, j, A[i][j]);
  36. }
  37. }
  38.  
  39. return 0;
  40.  
  41. }
  42.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement