From 38e0a2354c738936ff54a339f20302789b2c4504 Mon Sep 17 00:00:00 2001 From: Krishna Vedala Date: Fri, 24 Apr 2020 07:41:24 -0400 Subject: [PATCH] warning free print uint64 --- project_euler/Problem 401/sol1.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/project_euler/Problem 401/sol1.c b/project_euler/Problem 401/sol1.c index 70173b0e..2a62dbc9 100644 --- a/project_euler/Problem 401/sol1.c +++ b/project_euler/Problem 401/sol1.c @@ -2,6 +2,8 @@ #include #include #include +#define __STDC_FORMAT_MACROS +#include #ifdef _OPENMP #include #endif @@ -110,7 +112,7 @@ int main(int argc, char **argv) uint64_t result = sigma(N); double dtime = clock() - start_time; - printf("N = %llu\nSum: %llu\n", N, result); + printf("N = %" PRIu64 "\nSum: %" PRIu64 "\n", N, result); printf("Time taken: %.4gms\n", dtime * 1e3 / CLOCKS_PER_SEC); return 0;