Fix unsigned integer

This commit is contained in:
caskd 2019-11-01 18:19:56 +01:00
parent ed3ea680f4
commit e794208535
No known key found for this signature in database
GPG Key ID: 79DB21404E300A27
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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);