mirror of
https://github.com/theoludwig/programming-challenges.git
synced 2024-12-08 00:45:29 +01:00
20 lines
356 B
C
20 lines
356 B
C
|
#include <stdio.h>
|
||
|
#include <stdlib.h>
|
||
|
#include <string.h>
|
||
|
|
||
|
#include "character.h"
|
||
|
#include "input.h"
|
||
|
#include "string.h"
|
||
|
|
||
|
int main() {
|
||
|
char* string = input();
|
||
|
char character = string_first_non_repeating_character(string);
|
||
|
if (character == 0) {
|
||
|
printf("\n");
|
||
|
} else {
|
||
|
printf("%c\n", character);
|
||
|
}
|
||
|
free(string);
|
||
|
return EXIT_SUCCESS;
|
||
|
}
|