diff --git a/CMakeLists.txt b/CMakeLists.txt index ab4c75c..b5486b8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.0) project(learningc LANGUAGES C) set(CHAPTER 2) -set(EXERCISE 2) +set(EXERCISE 1) add_executable(learningc chapters/${CHAPTER}/exercises/${EXERCISE}.c) diff --git a/chapters/2/exercises/1.c b/chapters/2/exercises/1.c index f620553..72954e3 100644 --- a/chapters/2/exercises/1.c +++ b/chapters/2/exercises/1.c @@ -10,7 +10,7 @@ int main() { printf("\tUnsigned: %i to %i\n", 0, USHRT_MAX); printf("Int range is:\n"); printf("\tSigned: %i to %i\n", INT_MIN, INT_MAX); - printf("\tUnsigned: %i to %i\n", 0, UINT_MAX); + printf("\tUnsigned: %i to %u\n", 0, UINT_MAX); printf("Long range is:\n"); printf("\tSigned: %li to %li\n", LONG_MIN, LONG_MAX); printf("\tUnsigned: %i to %lu\n", 0, ULONG_MAX);