From 588070c130eadb1224dd93db5bd4135b988312af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mert=20G=C3=B6r?= Date: Mon, 6 Jan 2025 10:08:06 +0300 Subject: [PATCH] update --- ChangeLog | 8 ++++++++ c-basic/log.c | 13 +++++++++++++ c-basic/sin_cos_tan.c | 24 ++++++++++++++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 c-basic/log.c create mode 100644 c-basic/sin_cos_tan.c diff --git a/ChangeLog b/ChangeLog index e52b2d6..52d77e0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2025-01-06 Mert Gör + + * c-basic/CSD-C-Basic-Book/C.pdf: Sabitler(Literals) page 31 + + * c-basic/sin_cos_tan.c (main): other mathematical operations like sin cos asin acos tan atan functions + + * c-basic/log.c (main): page 30-31 log code + 2025-01-03 Mert Gör * c-basic/pow.c (main): pow example written diff --git a/c-basic/log.c b/c-basic/log.c new file mode 100644 index 0000000..650acad --- /dev/null +++ b/c-basic/log.c @@ -0,0 +1,13 @@ +#include +#include + +int main() +{ + double result; + + result = log10(1000); + + printf("%f\n", result); + + return 0; +} diff --git a/c-basic/sin_cos_tan.c b/c-basic/sin_cos_tan.c new file mode 100644 index 0000000..aad4130 --- /dev/null +++ b/c-basic/sin_cos_tan.c @@ -0,0 +1,24 @@ +#include +#include + +int main() +{ + double result; + + result = sin(3.141592653589793238462643 / 6); + printf("%f\n", result); + + result = cos(3.141592653589793238462643 / 3); + printf("%f\n", result); + + result = sin(3.141592653589793238462643 / 4) / cos(3.141592653589793238462643 / 4); + printf("%f\n", result); + + result = tan(3.141592653589793238462643 / 2); + printf("%f\n", result); + + result = tan(3.141592653589793238462643 / 4); + printf("%f\n", result); + + return 0; +}