print variables in different ways

This commit is contained in:
Mert Gör 🇹🇷 2024-01-24 14:01:20 +03:00
parent 215709240c
commit a225a6f70b
Signed by: hwpplayer1
GPG Key ID: 03E547D043AB6C8F

24
c-basic/print_variables.c Normal file
View File

@ -0,0 +1,24 @@
/**
* @file print_variables.c
* @author Mert Gör (mertgor@masscollabs.xyz)
* @brief print variables with different ways
* @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 = 10;
int b = 20;
// int a = 10, b = 20; is another option
printf("a = %d, b = %d\n", a, b);
printf("a = %d, b = %d\n", b, a);
printf("a and b printed together = %d%d\n", a, b);
return 0;
}