mirror of
https://github.com/theoludwig/programming-challenges.git
synced 2024-12-08 00:45:29 +01:00
19 lines
411 B
C
19 lines
411 B
C
#include <stdbool.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
|
|
#include "character.h"
|
|
#include "input.h"
|
|
#include "string.h"
|
|
|
|
int main() {
|
|
char* string = input();
|
|
string = string_to_upper(string);
|
|
string = string_replace(string, ' ', '\0');
|
|
bool is_palindrome = string_is_palindrome(string);
|
|
free(string);
|
|
printf("%s\n", is_palindrome ? "true" : "false");
|
|
return EXIT_SUCCESS;
|
|
}
|