Professional Documents
Culture Documents
Programming is called a science because you have to follow syntax or tokens to make your
program readable to the system.
Programming is also called an art because it doesn’t have standards to make your program
readable.
There are formats that is needed to follow to be understood by the system.
If you are to create a program, your program should cater the problem.
#include <stdio.h>
int main(){}
In writing a program, you must first include the preprocessor command ‘#include <stdio.h>’
Without the preprocessor command, you cannot use the functions to print out or display your
command.
In the command ‘int main()’ this is where the execution part of program start.
The execution part of program must be inside the curly bracket ({}).
int age;
printf(“”);
You can either print directly or write a variable to be serve as the storage of the value.
In the command ‘int age;’, you initialized the variable ‘age’ as the storage.
This enables you to store a value inside the variables by writing ‘int age = ‘value’;’
If we are going to use ‘printf(“”);’. All the text you have to write inside the quote will be
displayed on screen including the space, some commands of course are exceptions.
‘%d’ is a datatype holder of the integer (int). It holds the value of the variable.
‘%d’ must be put inside the quote. To display the value of the datatype holder, it must mention
the specific variable where the value is stored.
The name of the variable must be outside the quote after the comma (,).
return 0;
#include <stdio.h>
int main()
return 0;
Output:
Age is: 18