Monday, November 19, 2012

Modul_4 : OPERATOR (Part 2)

Modul_4  : OPERATOR (Part 2)
Nama      : Deab Sina
NIM        : 49012078
Jurusan    : D4 TMD ITB Batch 6



This is video about: Arithmetic Operator, Logical Operator, Bitwise Operator.

 



Link to this video:


Source Code:

// Video source code
#include<iostream>
using namespace std;

int main()
{
    // Arithmetic Operator
    int a, b, c, d, e;
    a = 1+1; // Addition
    b = 1-1; // Substration
    c = 1*1; // Multiplicatiion
    d = 1/1; // Division
    e = 1%1; // Modulo
    cout<<"======================================="<<endl;
    cout<<"         Arithmetic Operator:"<<endl;
    cout<<"======================================="<<endl;
    cout<<"1 + 1 = "<<a<<endl;
    cout<<"1 - 1 = "<<b<<endl;
    cout<<"1 * 1 = "<<c<<endl;
    cout<<"1 / 1 = "<<d<<endl;
    cout<<"1 % 1 = "<<e<<endl;

    cout<<"======================================="<<endl;
    cout<<"           Logical Operator:"<<endl;
    cout<<"======================================="<<endl;
    cout<<"1&&1 = "<<(1&&1)<<endl; // AND operator
    cout<<"1||1 = "<<(1||1)<<endl; // OR operator
    cout<<"!1   = "<<!1<<endl; // NOT operator

    cout<<"======================================="<<endl;
    cout<<"            Bitwise Operator:"<<endl;
    cout<<"======================================="<<endl;
    cout<<"1 & 0 = "<<(1&0)<<endl; // AND
    cout<<"1 | 0 = "<<(1|0)<<endl; // OR
    cout<<"1 ^ 1 = "<<(1^1)<<endl; // XOR
    cout<<"!1    = "<<!1<<endl; // NOT ! the same ~
    cout<<"5 <<1 = "<<(5<<1)<<endl; // Shift Left
    cout<<"10>>1 = "<<(10>>1)<<endl; // Shift Right

    system("pause");
    return 0;

}


Show detail about this Modul.

 https://docs.google.com/open?id=0B0z1Cq4I6LpQQk5kdlM1aFduSHc




[Pemrograman C] Fungsi Rekursi

Hallo, kali ini daney akan membuat video tutorial Fungsi Rekursi.
Rekursi adalah proses pengulangan barang-barang dengan cara kesamaan-diri. Sebagai contohnya, saat dua cermin berada paralel antara satu dengan yang lain, gambar yang tertangkap adalah suatu bentuk rekursi tak-terbatas.

nah kali ini proses fungsi rekursi akan dijalankan di pemrograman C..
langsung saja kita cek ke program nya. :)

Modul_1: Basic of C++ Programming ( How to install Microsoft Visual Studio 2010 )

Modul_1 : Basic of C++ Programming
Nama      : Deab Sina
NIM        : 49012078
Jurusan    : D4 TMD ITB Batch 6



This is video about: How to install Microsoft Visual Studio 2010 and Basic code in C++ Programming.

 

Link to this video:


Source Code:

#include <iostream> // Calling library

int main() // Main method
{
    // Latihan in Modul 1
    // We call comment single line
    /*
        We call comment multi line
    */

    char nama[50]; // We declare char virable nama that can insert 50 character
    int nim; // We declare int virable nim
    std::cout<<"Welcome to C++ Program\n"; // We use it for print everything in the string
    std::cout<<"Nama: "; // To get value from keyboard or user
    std::cin>>nama;
    std::cout<<"NIM : ";
    std::cin>>nim;
    std::cout<<"Jurusan : Ticnik Eletro - STEI - ITB\n";

    system("pause"); // We use for pause processing
    return 0; // For return the value 0

}

Show detail about this Modul.

https://docs.google.com/open?id=0B0z1Cq4I6LpQWTBlSnhiY1N1dXc