Thread: 2 Matrix to generate a 3rd one

  1. #1
    Registered User
    Join Date
    Mar 2011
    Posts
    1

    2 Matrix to generate a 3rd one

    Hi im trying to create a c program that the user insert a matrix's of 7x7 and the system create a second one 7x7 but the first seven are just the biggest numbers and the second seven are just the lowest numbers:

    Code:
    #include<stdio.h>
    int main (){
    int m[7][7],l,c;
    int i;
    
    for (l=0;l<7;l++){
    	for (c=0;c<7;c++){
    		printf("Inform a value: \n");
    		scanf("%d",&m[l][c]);
    }
    }
    
    for (l=0;l<7;l++){
    	for (c=0;c<7;c++){
    		printf("Matrix: %d \n", m[l][c]);
    }
    }
    }
    can someone shine a light! im just starting to learn C
    Last edited by danielldf; 03-20-2011 at 12:28 PM.

  2. #2
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Ok... shining light...

    If you are just starting C, stay with your tutorials and books. Work through them, do the exercises and study well enough that you understand what each example is doing.

    Why?

    1) Because it's very likely that something very similar to this is covered in your texts.
    2) Because this is a relatively advanced project, which will use up a lot of volunteer time here, if we have to baby-step you through it.

    Get through the tutorials first, start your project when you understand a little better... if you run into problems, post your code here (in code tags) and ask specific questions...
    Last edited by CommonTater; 03-20-2011 at 12:34 PM.

  3. #3
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    Could the process be streamlined? I'm unclear what you want to do, exactly. Maybe show an example?

    Would a 14 x 7 matrix be OK, and then sort it?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Sorting Matrix
    By alex 2010 in forum C++ Programming
    Replies: 0
    Last Post: 06-24-2010, 09:40 AM
  2. C - access violation
    By uber in forum C Programming
    Replies: 2
    Last Post: 07-08-2009, 01:30 PM
  3. Matrix Help
    By HelpmeMark in forum C++ Programming
    Replies: 27
    Last Post: 03-06-2008, 05:57 PM
  4. What is a matrix's purpose in OpenGL
    By jimboob in forum Game Programming
    Replies: 5
    Last Post: 11-14-2004, 12:19 AM