From c363e9df17910d3c2854c1c5c78708ed0b89f683 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mert=20G=C3=B6r?= Date: Wed, 24 Jan 2024 14:54:16 +0300 Subject: [PATCH] scanf example --- c-basic/scanf-example.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 c-basic/scanf-example.c diff --git a/c-basic/scanf-example.c b/c-basic/scanf-example.c new file mode 100644 index 0000000..3370189 --- /dev/null +++ b/c-basic/scanf-example.c @@ -0,0 +1,22 @@ +/** + * @file scanf-example.c + * @author Mert Gör (mertgor@masscollabs.xyz) + * @brief gettıng input source via scancf + * @version 0.1 + * @date 2024-01-24 + * + * @copyright Copyright (c) 2024 Mert Gör and cotributors - GPLv3 or any later + * + */ + +#include + +int main(){ + int a; + + printf("Enter a number: "); + scanf("%d", &a); + printf("The number you typed is : %d\n", a); + + return 0; +}