You are on page 1of 2

Review video on PROGRAMMING AN ART

& A SCIENCE, I want you to summarize my


points by way of making an outline or
bullets on important points. DEADLINE:
Tuesday, 4:00pm
In the video “PROGRAMMING AN ART AND A SCIENCE”, the video explains the following:

 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.

printf(“Age is: %d”, age);

 ‘%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;

 The last part of the program is the ‘return 0;’.


 ‘return 0;’ is the termination part of the program.

So, the complete code will be:

#include <stdio.h>

int main()

int age = 18;

printf(“Age is: %d”, age);

return 0;

Output:

Age is: 18

You might also like