Logically you can imagine a constable or a variable as an empty box that can be filled with something of a certain data type, for example we create an integer variable, then in logic we are creating an empty box that can only be filled with paper inscribed integers, may be a type other than an integer.
Suppose to create two constants or variables with the name of the value and x identifier each of which can be used to store a value in memory in accordance with the specified data type:
Suppose the value is a variable. Then the value variables that have been made this selajutnya can be used in the program, for example performed arithmetic operations in the form of division or modulo operations.
The image below shows an illustration of the operations that occur on the value variable. In this case the value variable is divided by number 2, and the result of the division operation is stored in a new variable named the quotient. Another arithmetic operation that occurs in the figure below is the value variable which module with the number 2 and the result stored in a new variabel named sides for. Operation on a constant or variable is not limited to arithmetic operations, but can also be a comparison operation. Suppose that the value is greater than the number 10 and others. An example of using a value variable in a simple problem is the determination of a number included in the odd or even category as shown in Figure 2
Similarly this article.
Sorry if there is a wrong word.
The end of word wassalamualaikum wr. wb
Referensi :
- Ebook Logical and Algorithm
Jika ingin bertanya secara privat, Silahkan hubungi no 085709994443 dan untuk berkomentar silahkan klick link di bawah ini 👇