#define SIZE 1 int main(){ SetConsoleCP(1251); SetConsoleOutputCP(1251); float arr[SIZE][SIZE]; int i,j; printf("Введите матрицу %dx %d\n",SIZE+1,SIZE+1);// ввод матрицы for(i=0;i<=SIZE;i++){ for(j=0;j<=SIZE;j++){ printf("\tArray[%d,%d]=",i,j); scanf("%f",&arr[i][j]); } printf("\n"); } system("cls"); for(i=0;i<=SIZE;i++){//вывод матрицы for(j=0;j<=SIZE;j++){ printf("Array[%d,%d] = %g \t",i,j,arr[i][j]); } printf("\n"); } return 0; } It is necessary to enter from the keyboard and output an array of real numbers.
But for some reason, 1 cycle is performed 3 times instead of 4. And the result is incorrect. I suspect that the problem is in the specifiers.
i<=SIZE,j<=SIZE), and then anything can happen. - PinkTuxSIZE, and you write downSIZE+1data. Because indexing comes from scratch, the correct condition is not<=, but<. - PinkTux