Hi guys I have been trying to teach myself C for about 2 weeks now. To get more practice I decided to program my alogorithms class program in C instead of java( I dont't like java).
Here is my question:
I have to input from stdin so my input is
so I'm trying to figure how do I wirte my code accept this from standard in.Code:5 00101 00100 11001 00000 10100 5 01010 10101 01011 10101 01110
This is what I have so far: *note*this is not the whole program
This is some code I found that inputs random 1's and 0's into a matixCode:scanf("%d", &nn); for (i = 0; i < nn; i++) for (j = 0; j < i; j++) cc =getchar()
Sorry I wrote so much hope I got my point acrossCode:void complete_graph(int nv) { int **mat; int i, j; mat = initialize_mat(); for (i = 0; i < nv; i++) { for (j = 0; j < nv; j++) mat[i][j] = 1; } for (i = 0; i < nv; i++) mat[i][i] = 0; print_mat(mat); }
Thx in advance



LinkBack URL
About LinkBacks


