char c;
for (int i = 0; i < n; i++)
{
for (int j = 0; j < m; j++)
{
fscanf(f, "%d", &pole[i][j]);
fscanf(f, "%c", &c);
printf("%d ",pole[i][j]);
}
printf("\n");
}
#include<stdio.h>
#include<stdlib.h>
#include<time.h>
#include<limits.h>
int main()
{
srand((unsigned)time(NULL));
const int n = 4;
const int m = 3;
int idx = 0;
int summa = 0;
int min_sum = INT_MAX;
int a[n][m];
for (int i = 0; i < n; i++)
{
for (int j = 0; j < m; j++)
{
a[i][j] = rand() % 20;
summa += a[i][j];
printf("a[%d][%d]=%d\n", i, j, a[i][j]);
}
if(min_sum > summa)
{
min_sum = summa;
idx = i;
}
printf("summa[%d]=%d\n", i, summa);
summa = 0;
}
printf("min summa[%d]=%d\n", idx, min_sum);
for(int i = 0; i < m; i++)
{
printf("a[%d][%d]=%d\n", idx, i, a[idx][i]);
}
return 0;
}