print variables in different ways
This commit is contained in:
parent
215709240c
commit
a225a6f70b
24
c-basic/print_variables.c
Normal file
24
c-basic/print_variables.c
Normal 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;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user