Move some things to a util source file
Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
parent
7a313be2f9
commit
c3cfd140bb
BIN
current
BIN
current
Binary file not shown.
11
src/main.c
11
src/main.c
@ -1,9 +1,5 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#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;
|
||||
|
7
src/utils.h
Normal file
7
src/utils.h
Normal file
@ -0,0 +1,7 @@
|
||||
#define true 1
|
||||
#define false 0
|
||||
#define boolean char
|
||||
struct String{
|
||||
int length;
|
||||
char*str;
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user