Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
controle-c-001
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
florian.burgener
controle-c-001
Commits
f8241ffe
Commit
f8241ffe
authored
3 years ago
by
Florian Burgener
Browse files
Options
Downloads
Patches
Plain Diff
Ex 1
parent
5a8cebbb
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
ex1/main
+0
-0
0 additions, 0 deletions
ex1/main
ex1/main.c
+19
-19
19 additions, 19 deletions
ex1/main.c
ex1/main.o
+0
-0
0 additions, 0 deletions
ex1/main.o
with
19 additions
and
19 deletions
ex1/main
0 → 100755
+
0
−
0
View file @
f8241ffe
File added
This diff is collapsed.
Click to expand it.
ex1/main.c
+
19
−
19
View file @
f8241ffe
...
...
@@ -16,29 +16,29 @@
#include
<stdlib.h>
#include
<string.h>
int
main
()
{
// int32_t values_length = 5;
// double values[values_length];
bool
is_latin_square_normalized
(
int32_t
latin_square
[
4
][
4
])
{
for
(
int32_t
i
=
0
;
i
<
4
;
i
+=
1
)
{
if
(
latin_square
[
0
][
i
]
!=
i
+
1
||
latin_square
[
i
][
0
]
!=
i
+
1
)
{
return
false
;
}
}
// for (int32_t i = 0; i < values_length; i += 1) {
// double value;
// scanf("%lf", &value);
// values[i] = value;
// }
return
true
;
}
// int32_t values_length = 5;
//
int32_t
values[values_length
];
int
main
()
{
int32_t
latin_square
[
4
][
4
];
// for (int32_t i = 0; i < values_length; i += 1) {
// int32_t value;
// scanf("%d", &value);
// values[i] = value;
// }
for
(
int32_t
i
=
0
;
i
<
4
;
i
+=
1
)
{
for
(
int32_t
j
=
0
;
j
<
4
;
j
+=
1
)
{
int32_t
tmp
;
scanf
(
"%d"
,
&
tmp
);
latin_square
[
i
][
j
]
=
tmp
;
}
}
// char a[100];
// int32_t b;
// scanf("%s %d", a, &b);
// printf("%s %d\n", a, b);
bool
is_normalized
=
is_latin_square_normalized
(
latin_square
);
printf
(
"latin normalisé: %s
\n
"
,
(
is_normalized
?
"oui"
:
"non"
));
return
EXIT_SUCCESS
;
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
ex1/main.o
0 → 100644
+
0
−
0
View file @
f8241ffe
File added
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment