1. Input an dimension and elements of an array from the keyboard. Count the odd elements of an array and that number join to variable K, then sort the last K elements in decreasing order. (I hope you understand what I'm doing here cause I'm not used to type this type of problems in English)

Code:

#include <stdio.h>
main ()
{
int A[100], i, n, j, K = 0;
printf ("Type in the dimension of an array: \n");
scanf ("%d", &n);
printf ("Type in the elements of an array: \n");
for (i = 0; i < n; i++)
{
scanf("%d", &A[i]);
}
for(i=0; i<n; i++)
{
if(A[i]%2 == 1)
{
K++ ;
else printf ("There is no odd elements! \n")
}
}
for(i = n-K; i < n - 1; i++)
{
for(j = i + 1; j < n, j++)
{
pom = A[i];
A[i] = A[j];
A[j] = pom;
}
}

2. Input a matrix A(nxm) from a keyboard. Find a column with a minimum and maximum sum of elements and replace their elements.

Code:

#include <stdio.h>
main ()
{
int i, j, m, n, A[20][20], sum=0, min, max, index_min, index_max, pom;
printf ("Type in the dimension of a matrix: \n");
scanf ("%d%d", &n, &m);
printf ("Type in the elements of a matrix: \n");
for (i = 0; i < n; i++)
{
for (j = 0; j < m; j++)
{
scanf ("%d", &A[i][j]);
}
}
for(j = 0; j < n; j++)
{
for(i = 0; i < m; i++)
{
sum[j] += A[i][j];
}
}
for(j = 0; j < n; j++)
{
sum[0] = max;
if(sum[j] > max)
{
max = sum[j]; .
index_max = j;
}
}
for(j = 0; j < n; j++)
{
sum[0] = min;
if(sum[j] < min)
{
min = sum[j];
index_min = j;
}
for(i = 0; i < m; i++)
{
pom = A[i][index_max];
A[j][index_max] = A[j][index_min];
A[j][index_min] = pom;
}
printf (Transformed matrix is: \n");
for (i = 0; i < n; i++)
{
for (j = 0; j < m; j++)
{
scanf ("%d", A[i][j]);
}
}
}

Can you check for mistakes and help me correct it pls. Thanks!