two variables scanned by scanf

This commit is contained in:
Mert Gör 🇹🇷 2024-01-24 15:47:29 +03:00
parent c363e9df17
commit 8d26918b7f
Signed by: hwpplayer1
GPG Key ID: 03E547D043AB6C8F

View File

@ -0,0 +1,23 @@
/**
* @file scanf-example-two-variables.c
* @author Mert Gör (mertgor@masscollabs.xyz)
* @brief scanf example with two variables
* @version 0.1
* @date 2024-01-24
*
* @copyright Copyright (c) 2024 Mert Gör and contributors - GPLv3 or any later
*
*/
#include <stdio.h>
int main(){
int a;
int b;
printf("enter two variables/numbers: ");
scanf("%d%d", &a, &b);
printf("a = %d, b = %d\n", a, b);
return 0;
}