Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <math.h>
- int main()
- {
- 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");
- printf("Da se smenqt mestata na redovete sudurjashti maksimalniq i minimalniq element na matricata.\n");
- printf("Avtor: ..........\n");
- int M;
- printf("M = ");
- scanf("%d", &M);
- int A[M][M];
- for(int i = 0; i < M; i++){
- for(int j = 0; j < M; j++){
- printf("A[%d][%d] = ", i, j);
- int number = 0;
- scanf("%d", &number);
- while(number < 0 || number > 99){
- printf("Vavedi chislo v intervala [0;99]\n");
- printf("A[%d][%d] = ", i, j);
- scanf("%d", &number);
- }
- A[i][j] = number;
- }
- }
- printf("---------------\n");
- for(int i = 0; i < M; i++){
- for(int j = 0; j < M; j++){
- printf("A[%d][%d] = %d\n", i, j, A[i][j]);
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement