Highlander-SP
Member level 3
Dear friends,
How can I find any way, in C program, when the user entry with an origin point and final point?
The map is in matrix form, when is 1, exist an way from numer line to number colun, as the picture.
I hava begin, anybory can help continuing it?
# include <stdio.h>
main () {
int k, a,b, o, f, M[10][10];
printf("Entry the matrix dimention (k X k)");
scanf("%d", &k);
printf("Type the matrix:\n");
for (a = 0; a < k; a++){
for (b = 0; b < k; b++)
scanf("%d", &M[a]);
}
printf("Entry with the origin point and final point");
scanf("%d",&o);
scanf("%d",&f);
...............
...............
.......
.........................
?
?
if...............
printf("It's possible to do that way");
else.............
printf("It's not possible to do that way");
}
How can I find any way, in C program, when the user entry with an origin point and final point?
The map is in matrix form, when is 1, exist an way from numer line to number colun, as the picture.
I hava begin, anybory can help continuing it?
# include <stdio.h>
main () {
int k, a,b, o, f, M[10][10];
printf("Entry the matrix dimention (k X k)");
scanf("%d", &k);
printf("Type the matrix:\n");
for (a = 0; a < k; a++){
for (b = 0; b < k; b++)
scanf("%d", &M[a]);
}
printf("Entry with the origin point and final point");
scanf("%d",&o);
scanf("%d",&f);
...............
...............
.......
.........................
?
?
if...............
printf("It's possible to do that way");
else.............
printf("It's not possible to do that way");
}