From c3cfd140bba85b3fe6c684a848c757a3ba0c6757 Mon Sep 17 00:00:00 2001 From: "sigonasr2, Sig, Sigo" Date: Thu, 14 Jul 2022 17:57:15 +0000 Subject: [PATCH] Move some things to a util source file Co-authored-by: sigonasr2 --- current | Bin 16856 -> 16856 bytes src/main.c | 11 +---------- src/utils.h | 7 +++++++ 3 files changed, 8 insertions(+), 10 deletions(-) create mode 100644 src/utils.h diff --git a/current b/current index aeccd21001bf6b83d1194596b96ff4e86a1cd390..f04183aee6771206191ee04dd07b10616c639644 100755 GIT binary patch delta 55 zcmcc7%y^@jaYF{P2{b2JyxTFXY=wwezj`!b46}R#pbrk`0{{T&p8x;= N$3^Jp1G6d -#include - -#define true 1 -#define false 0 -#define boolean char +#include "utils.h" /* A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99. @@ -13,11 +9,6 @@ Find the largest palindrome made from the product of two 3-digit numbers. https://projecteuler.net/problem=4 */ -struct String{ - int length; - char*str; -}; - struct String numberToString(int numb) { int placeValues=0; int tempNumb=numb; diff --git a/src/utils.h b/src/utils.h new file mode 100644 index 0000000..d785fa2 --- /dev/null +++ b/src/utils.h @@ -0,0 +1,7 @@ +#define true 1 +#define false 0 +#define boolean char +struct String{ + int length; + char*str; +}; \ No newline at end of file