• Welcome back, on this post I’ll give you a summary about Repetition on C language.

    Repetition has similar algorithmic pattern if you compare it with ‘If’ function except it call it’s function again when the the condition given still true. In C language, repetition category consist of 3 function, While, For, and Do-While.

    “While” is the most simple repetition, you can put wide range of condition into it. but to make the looping end you need to make the condition false inside the statement, except you want an endless loop.

    “For” has the same algorithm like “While” but it has the initialization and increment or decrement packed along with to the conditional expression, it saves some lines of coding and make the syntax simpler to use but it make the range of conditional expression is limited.

    “Do-While” has a reversed order if it compared with while, it runs the statement first before do the conditional checking.

    Like the selection, Repetition has a nested form, the logic is like this, there is two repetition, Loop A and loop B, Loop B is in the Loop A, when the program started the loop A run and execute the loop B, loop B do the repetition until the condition on Loop B turns false, after that the Loop A do conditional check, if it’s condition still true it will execute Loop B again.

  • Welcome back, our latest lecture is about Selection.

    The Selection is “a part of program algorithm that resulting a branching of the work flow and the flow of the algorithm is controlled by it’s condition”. or to put it simply, the “branch” of program workflow.

    there is several type of selection on C Language:

    1. If
      If is the most basic function on the Selection it has only a condition and one statement. if the program could fulfill the given condition, then the program will execute the statement, otherwise, nothing hapened, the program will skip the function.
    2. If-else
      similar to if structure but it has default statement which will executed when the condition isn’t fulfilled.
    3. Nested If
      usually happened when there is multiple condition to be checked. there is two type of nested if, first is “If under If” and “If-Else If” both of them have different syntax and slightly different meaning. while “If under If means there is condition check after the first selection get true result, “If-Else If” give another condition check when the first selection get false result.
    4. Switch-Case
      has similar function with “If-Else If”, but has more simple syntax, it usually used for Nested If condition that has lot of condition to check. this function really help to make the code easier to read.
    5. “?:” operator
      Similar with If-Else function, but it is used to return value.

    That’s all for today, Have a good day~

  • Programming is about mathematical and logical solving. this what I learn on 2nd meeting of combine lecture. the basic of all mathematical and logical solving is  the operator usage. I already understand most of the lecture about the arithmetic operator (the simple one and the increment-decrement). well I found something interesting about the increment decrement operation usage, that they can be used as binary operator.

    the conditional operator was something new to me. it is has the basic function like the If-else fuction. but it is only used to directly give value to the variable.

    another operator that news to me is Bitwise operator it is a bit hard to understand how it is work but I managed to understand about it. this type of operation requires the value of the variable tobe turned into binary value and the operation is being done bit by bit.

  • today’s lecture is about Algorithm. it is combined class between GAT, MAT, and CS division. no wonder it is big one.

    the first session is talk show which I really don’t get it how Object Oriented Programming works (at least I know that is one of method to make code “specialize” by it self).

    On the second half is about introduction to the C programming language… most of us are already understand the basic of C programming. Today’s lecture consist of History of C programming, the process of making program, types of algorithm (flow chart and pseudo-code), the basic use of pseudo code,  and lot of basic structure of C language. The things I don’t know is how the suffix works well I understand it is one other kind of constant but how we can implement it is my question.