update codingame challenges

Adding python challenges and sorting the challenges
This commit is contained in:
Arkagedon
2022-03-13 18:15:15 +01:00
parent a7a32adf99
commit d894ebe609
15 changed files with 80 additions and 1 deletions

27
C/Easy_Challenges/the_descent.c Executable file
View File

@ -0,0 +1,27 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <stdbool.h>
int main()
{
// game loop
while (1) {
int mountain_max = 0, mountain_Id = 0;
for (int i = 0; i < 8; i++) {
// represents the height of one mountain.
int mountain_h;
scanf("%d", &mountain_h);
if (mountain_h > mountain_max)
{
mountain_max = mountain_h;
mountain_Id = i;
}
}
printf("%d\n",mountain_Id);
}
return 0;
}