Skip to content
Snippets Groups Projects
Commit 460fae1a authored by florian.burgener's avatar florian.burgener
Browse files

Exercice 1

parent 108b33d3
Branches
Tags
No related merge requests found
...@@ -17,29 +17,25 @@ ...@@ -17,29 +17,25 @@
#include <string.h> #include <string.h>
int main() { int main() {
// int32_t values_length = 5; int32_t values_length = 8;
// double values[values_length]; int32_t values[values_length];
// for (int32_t i = 0; i < values_length; i += 1) { for (int32_t i = 0; i < values_length; i += 1) {
// double value; int32_t value;
// scanf("%lf", &value); scanf("%d", &value);
// values[i] = value; values[i] = value;
// } }
int32_t drop_count = 0;
int32_t drop_sum = 0;
// int32_t values_length = 5; for (int32_t i = 1; i < values_length; i += 1) {
// int32_t values[values_length]; if (values[i] < values[i - 1]) {
drop_count += 1;
// for (int32_t i = 0; i < values_length; i += 1) { drop_sum += values[i - 1] - values[i];
// int32_t value; }
// scanf("%d", &value); }
// values[i] = value;
// } printf("\n%d %d\n", drop_count, drop_sum);
// char a[100];
// int32_t b;
// scanf("%s %d", a, &b);
// printf("%s %d\n", a, b);
printf("ex1\n");
return EXIT_SUCCESS; return EXIT_SUCCESS;
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment