Need help whit programing test In C language

This is a discussion on Need help whit programing test In C language within the C Programming forums, part of the General Programming Boards category; Hello, i have to write a test i don't know how to do these two programs.. 1.Given matrix NxM. Get ...

  1. #1
    Registered User
    Join Date
    Nov 2010
    Posts
    20

    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 )

  2. #2
    Registered User Char*Pntr's Avatar
    Join Date
    Sep 2007
    Location
    Lathrop, CA
    Posts
    198
    Quote Originally Posted by alionas View Post
    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

  3. #3
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,712
    What have you tried?
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  4. #4
    Registered User
    Join Date
    Nov 2010
    Posts
    20
    #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....
    Last edited by alionas; 11-11-2010 at 01:51 PM.

  5. #5
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,532
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 15
    Last Post: 08-09-2009, 11:20 AM
  2. Creating C/C++ Unit Test Cases
    By chiefmonkey in forum C++ Programming
    Replies: 1
    Last Post: 04-28-2009, 08:29 PM
  3. Thread Prog in C language (seg fault)
    By kumars in forum C Programming
    Replies: 22
    Last Post: 10-09-2008, 01:17 PM
  4. test scores
    By ucme_me in forum C Programming
    Replies: 4
    Last Post: 11-14-2001, 12:48 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21