# Need help whit programing test In C language

• 11-11-2010
alionas
Need help whit programing test In C language
Hello,
i have to write a test i don't know how to do these two programs..

1.Given matrix NxM. Get sequence b1 ,….,bn , where bk the largest element of row k.

2. Enter an integer N. Enter a whole number N x M to the table. The following table each row to find the minimum number, then the maximum. Print found in the number of coordinates (row, column).

wee haven't learn it... So would be someone so kind to help me to do these programs in C language? :)

It would be BIG thanks :))
• 11-11-2010
Char*Pntr
Quote:

Originally Posted by alionas
Hello,
i have to write a test i don't know how to do these two programs..

1.Given matrix NxM. Get sequence b1 ,….,bn , where bk the largest element of row k.

2. Enter an integer N. Enter a whole number N x M to the table. The following table each row to find the minimum number, then the maximum. Print found in the number of coordinates (row, column).

wee haven't learn it... So would be someone so kind to help me to do these programs in C language? :)

It would be BIG thanks :))

HOMEWORK POLICY
• 11-11-2010
laserlight
What have you tried?
• 11-11-2010
alionas
#include <stdio.h>
#include <stdlib.h>

void ivesti_matrica( int matrica[][3], int eiluciu_sk);
void spausdinti_matrica( int matrica[][3], int eiluciu_sk);
int main()
{ int a [3][3];
printf("Prasom ivedineti matricos elementus \n");
ivesti_matrica(a,3);
printf("Ivesta matrica: \n");
spausdinti_matrica(a,3);
printf("Ivesta matrica per kita kreipini: \n");
spausdinti_matrica(&a[0],3);
printf("Ivesta matrica per dar viena kreipini: \n");
spausdinti_matrica(&*a,3);
system("pause");
return 0;}
void ivesti_matrica( int matrica[][3], int eiluciu_sk)
{
int i,j;
for (i=0;i<eiluciu_sk;i++)
for (j=0;j<eiluciu_sk;j++)
{
printf("Iveskite a[%d,%d]elementa ",i+1,j+1);
scanf("%d",&matrica[i][j]);
}}
void spausdinti_matrica( int matrica[][3], int eiluciu_sk)
{ int i,j;
for (i=0;i<eiluciu_sk;i++)
{
for (j=0;j<eiluciu_sk;j++)
printf("%4d",matrica[i][j]);
printf("\n"); }}

well i tried this is't work but i need now just find the largest element of the row k and i don't know how to do this....
• 11-20-2010
Salem