Skip to content
Snippets Groups Projects
Commit 4ee933c8 authored by Florian Burgener's avatar Florian Burgener
Browse files

Ex 1

parent 28de996c
Branches
No related tags found
No related merge requests found
...@@ -15,30 +15,27 @@ ...@@ -15,30 +15,27 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <ctype.h>
int main() { int main() {
// int32_t values_length = 5; char str1[100];
// double values[values_length]; char str2[100];
// for (int32_t i = 0; i < values_length; i += 1) { scanf("%s", str1);
// double value; scanf("%s", str2);
// scanf("%lf", &value);
// values[i] = value;
// }
// int32_t values_length = 5; if (strlen(str1) != strlen(str2)) {
// int32_t values[values_length]; printf("\ndistance: -1\n");
return EXIT_FAILURE;
}
// for (int32_t i = 0; i < values_length; i += 1) { int32_t distance = 0;
// int32_t value;
// scanf("%d", &value);
// values[i] = value;
// }
// char a[100]; for (int32_t i = 0; i < (int32_t)strlen(str1); i += 1) {
// int32_t b; distance += abs(toupper(str1[i]) - toupper(str2[i]));
// scanf("%s %d", a, &b);
// printf("%s %d\n", a, b); }
printf("\ndistance: %d\n", distance);
return EXIT_SUCCESS; return EXIT_SUCCESS;
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment