- #1
kole08
- 1
- 0
hello
ok i think i posted this in the wrong area so i hope this is right.
so I have to write a program using matrix, however i have some of it done, i just want to know if i am on the right track before i continue on with my program.
here is what i have to do:
Give an integer matrix array of size n by m, (m and n must be greater than 1 and less than 5) whose contents are numbers from 0 to 20, write a program that ask the users for the values of n, m and nxm integer values (from 0 to 20) and count how many times each different number is repeated in the matrix.
i have to prompt the user for the values of n and m however they must be greater than one and less than 5
i also have to prompt the user for nxm with integer values in the range of 0 and 20
here is what i have so far:
#include <stdio.h>
#include <math.h>
int n;
int m;
int nxm;
int max = 5;
int min =1;
int a[j];
/*input subsection*/
printf("please input the values of n and m"\, n, m);
scanf("%d %d &n, &m");
printf("please input the value of nxm\n", nxm);
scanf(""%d" , &nxm);
now i know this is probably wrong because i still have to figure out the ranges of the numbers and all but if someone could help lead me into the right direction that would be great. Also i am not finished working on this too so it may not make since i just want to make sure i am going in the right direction!
ok i think i posted this in the wrong area so i hope this is right.
so I have to write a program using matrix, however i have some of it done, i just want to know if i am on the right track before i continue on with my program.
here is what i have to do:
Give an integer matrix array of size n by m, (m and n must be greater than 1 and less than 5) whose contents are numbers from 0 to 20, write a program that ask the users for the values of n, m and nxm integer values (from 0 to 20) and count how many times each different number is repeated in the matrix.
i have to prompt the user for the values of n and m however they must be greater than one and less than 5
i also have to prompt the user for nxm with integer values in the range of 0 and 20
here is what i have so far:
#include <stdio.h>
#include <math.h>
int n;
int m;
int nxm;
int max = 5;
int min =1;
int a[j];
/*input subsection*/
printf("please input the values of n and m"\, n, m);
scanf("%d %d &n, &m");
printf("please input the value of nxm\n", nxm);
scanf(""%d" , &nxm);
now i know this is probably wrong because i still have to figure out the ranges of the numbers and all but if someone could help lead me into the right direction that would be great. Also i am not finished working on this too so it may not make since i just want to make sure i am going in the right direction!