C: 2015 day 03 complete

This commit is contained in:
2018-03-22 07:46:02 -05:00
parent 8fbefb2a3c
commit de5c4ac25c
2 changed files with 71 additions and 3 deletions

View File

@@ -37,7 +37,6 @@ int getBoxArea(int l, int w, int h) {
void part1() {
printf("Part 1\n");
char str[100];
int l, w, h, result = 0;
while(scanf("%dx%dx%d", &l, &w, &h) > 0) {
result += getBoxSidesArea(l, w, h) + getSmallestSideArea(l, w, h);
@@ -47,7 +46,6 @@ void part1() {
void part2() {
printf("Part 2\n");
char str[100];
int l, w, h, result = 0;
while(scanf("%dx%dx%d", &l, &w, &h) > 0) {
result += getSmallestPerimeter(l, w, h) + getBoxArea(l, w, h);