Added book examples
This commit is contained in:
15
C5/displaying_variables.c
Normal file
15
C5/displaying_variables.c
Normal file
@@ -0,0 +1,15 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
// Declare some variables
|
||||
int a = 1, b = 2;
|
||||
float f = 1.23f;
|
||||
|
||||
// Use printf display text on the screen
|
||||
printf ("The variables are\na = %d\nb=%d\nf=%f", a, b, f);
|
||||
|
||||
// Exit from main
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user