Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Yassine BAHOU
Projet labyrinthe
Commits
2ae29565
Commit
2ae29565
authored
Jun 24, 2021
by
Yassine BAHOU
Browse files
grille complet
parent
333d5652
Changes
1
Hide whitespace changes
Inline
Side-by-side
grille/grille.c
0 → 100644
View file @
2ae29565
#include
"grille.h"
void
genaration_arretes
(
int
taille
){
int
a
,
b
;
for
(
int
i
=
0
;
i
<
(
taille
+
1
)
*
(
taille
+
1
);
i
++
){
a
=
i
+
taille
+
1
;
b
=
i
+
1
;
if
((
i
+
1
)
%
(
taille
+
1
)
==
0
&&
a
<
(
taille
+
1
)
*
(
taille
+
1
)){
printf
(
"{%d - %d} -> |
\n
"
,
i
,
a
);
// les case a droites
}
if
(
taille
>=
(
taille
+
1
)
*
(
taille
+
1
)
-
i
-
1
&&
b
<
(
taille
+
1
)
*
(
taille
+
1
)){
printf
(
"{%d - %d} -> --
\n
"
,
i
,
b
);
//// les case en bas
}
if
(
taille
<
(
taille
+
1
)
*
(
taille
+
1
)
-
i
-
1
&&
b
<
(
taille
+
1
)
*
(
taille
+
1
)
&&
(
i
+
1
)
%
(
taille
+
1
)
!=
0
){
printf
(
"{%d - %d} -> |
\n
"
,
i
,
a
);
printf
(
"{%d - %d} -> --
\n
"
,
i
,
b
);
}
}
}
int
main
()
{
genaration_arretes
(
4
);
return
0
;
}
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment