Selasa, 13 Oktober 2015

PERTEMUAN ALGORITMA KE 2

Pertemuan Ke -2 Algorithm and Programming

Thursday,8 October 2015.
Topik yang dipelajari : Operator,Operand, and Arithmetic
*Operator and Operand Introduction
1.Example :
C=A+B
[ “=” And “+” are operators, A,B,and C are operands]
2.Based on its operand number,operator can be divided into three :
-Unary Operator  ( Need One Operand)
-Binary Operator ( Needs Two Operands)
-Ternary Operator ( Needs Three Operands)
3.Berdasarkan tipe operasinya,operator dapat dibagi menjadi :
Assignment operator,logical operator,arithmetic operator,relational operator,bitwise operator, and pointer operator.
*int=bilangan bulat (dibulatkan ke bawah)
Example : 3,5=3
*Increment and Decrement
Symbol : Increment(++) and Decrement(–)
Pre increment (++N)
Post increment (N++)
Pre decrement (–N)
Post decrement (N–)
“==” : Membandingan apakah True/False
“=” : Memasukkan Nilai
*Fungsi xor : Lawannya fungsi biimplikasi
-True + True = False
-False +False =False
-True + False = True
-False +True = True
Operator, Operand, and Arithmetic
Operator adalah sebuah symbol untuk memproses suatu nilai menjadi nilai baru
Operand adalah data yang akan di proses oleh operator
operand terbagi menjadi 3
  • Unary operator
  • Binary operator
  • Ternary operator
Operator sendiri terbagi menjadi 6 grup
  • Assignment Operator
  • Logical Operator
  • Arithmathic Operator
  • Relational Operator
  • Bitwise Operator
  • Pointer Operator
Arithmatic operator sendiri memiliki symbol
  • +   Addition
    –    Subtraction
    *    Multiply
    /     Division
    %   Modulo
    ++  Increment
    —   Decrement
    ()   Scope / Priority

Tidak ada komentar:

Posting Komentar