Sunday, January 27, 2013

Pointer(5)


Create a program comprised three variables a, b, c which fed from the main function is then passed to the function without the need for return values​​. The third output is the variable whose value is two times the previous
========================================================================
Buatlah program terdiri 3 variable a, b, c yang di inputkan dari fungsi main kemudian dilewatkan ke fungsi yang tanpa memerlukan nilai balikan. Outputnya adalah ketiga variable tersebut yang nilainya dua kali sebelumnya

Script Program :

Saturday, January 26, 2013

Pointer(4)



Create a program that displays inverted sentences from a sentence entered
For example:
Enter a sentence: kasur
Opposite: rusak

========================================================================

Buatlah program yang menampilkan kalimat terbalik dari suatu kalimat yang diinputkan
Misal:
Masukkan sebuah kalimat: kasur
Kebalikannya: rusak


Script Program :

Friday, January 25, 2013

Pointer(3)

Create a program to answer the question below:
aziz = 57 082
defa = aziz
dewi = defa +1
a. how the value of defa?
b. how the value of dewi?
aziz = 57 082
defa = & aziz
dewi = defa * +1
a. how the value of defa?
b. how the value of dewi?

========================================================================

Buatlah program untuk menjawab pertanyaan di bawah ini:
aziz = 57082
defa = aziz
dewi = defa +1
a. berapa nilai defa?
b. berapa nilai dewi?
aziz = 57082
defa = &aziz
dewi = *defa+1
a. berapa nilai defa?
b. berapa nilai dewi?


Script Program :

Thursday, January 24, 2013

Pointer(2)


Create a program to calculate a lot of character
========================================================================
Buatlah program menghitung banyak karakter

Script Program :

Wednesday, January 23, 2013

Pointer(1)

Here is a program that uses the output of the function pointer. Run the program and program flow analysis.
========================================================================
Berikut ini adalah program yang menggunakan suatu pointer output dari fungsi. Jalankan program ini dan analisis alur programnya. 

Script Program :

Tuesday, January 22, 2013

Struct (5)


Complex number has the form a + bi, with a and b are real numbers. A notation called the real part and b is called the imaginary part. Create a program using structure to add, subtract, and multiply complex numbers 2 pieces.
example:
(2 +3 i) + (-1 + 3i) = 1 +6 i
(2 +3 i) - (-1 + 6i) = 3 - 3i
(2 +3 i). (-1 + 3i) = -2 - 3i + 6i + 9 i2 = -2 - 3i + 6i - 9 = -11 + 3i

========================================================================

Bilangan kompleks memiliki format a+b i, dengan a dan b adalah bilangan real. Notasi a disebut juga bagian real, dan b disebut juga bagian imajiner. Buatlah program menggunakan struktur untuk menjumlahkan, mengurangkan, dan mengalikan 2 buah bilangan kompleks. 
Contoh: 
(2+3 i) + (-1 + 3i) = 1+6 i 
(2+3 i) - (-1 + 6i) = 3 – 3i 
(2+3 i) . (-1 + 3i) = -2 – 3i + 6i + 9 i2 = -2 – 3i + 6i – 9 = -11 + 3i



Script Program :

Monday, January 21, 2013

Struct (4)

Create a program to use the function to determine the difference between two time (hours). Suppose the difference between the hours of 4:30 to 6:00 is 90 minutes. There are 2 arguments function, namely the first hour and the second hour (greater than the first hour). Hint: make clock structure (with unit hours and minutes).
========================================================================
Buatlah program menggunakan function untuk menentukan selisih antara dua waktu (jam). Misalkan selisih antara pukul 4.30 dengan 6.00 adalah 90 menit. Terdapat 2 argumen function yaitu jam pertama dan jam kedua (lebih besar dari jam pertama). Petunjuk : buat struktur jam (dengan unit jam, dan menit). 


Script Program :

Sunday, January 20, 2013

Struct (3)


Create a program for a sales database structure consists of:

  • Code of goods
  • Item
  • Number of items
  • Prices of goods
  • Date of purchase
  • Discount


========================================================================

Buatlah program struktur untuk database penjualan terdiri atas:

  • Kode barang 
  • Nama barang
  • Jumlah barang 
  • Harga barang 
  • Tanggal pembelian 
  • Discount 



Script Program :

Saturday, January 19, 2013

Struct (2)

Make ID cards for identification and structure of each KTM
========================================================================
Buatlah struktur untuk identifikasi KTP dan KTM masing-masing


Script Program :

Friday, January 18, 2013

Struct (1)

Create a program to calculate the structure of the triangle area and perimeter
========================================================================
Buatlah program struktur untuk menghitung luas dan keliling segitiga

Script Program :

Thursday, January 17, 2013

Function - Fungsi (8)

Create a program that contains a form MAIN MENU contains arithmetic operations of addition, deprivation, multiplication and division. MAIN MENU contains 3 options appear as follows: MAIN MENU 1. Operation Addition 2. Operation Reduction 3. Operation Multiplication 4. The division operation x. Exit menu above will be repeated menrus by requiring that users enter a code. If the code on the user fed by other than 1,2,3,4 or x, a message appears "The code does not match", while the X code would also result in the message "Thank You".
===========================================================================
Buatlah program bentuk MENU UTAMA yang berisi operasi aritmetika yang berisi penjumlahan, pengurangn, perkalian dan pembagian. MENU UTAMA tersebut berisi 3 pilihan yang tampil seperti berikut: MENU UTAMA 1. Operasi Penjumlahan 2. Operasi Pengurangan 3. Operasi Perkalian 4. Operasi Pembagian x. Keluar Menu di atas akan diulang terus menrus dengan meminta pengguna supaya memasukkan kode. Jika kode yang di inputkan oleh pengguna selain 1,2,3,4 atau x, satu pesan muncul “Kode tidak sesuai!”, sedangkan kode X pula akan menghasilkan pesan “Terima Kasih”.

Script Program :

Wednesday, January 16, 2013

Function - Fungsi (7)

Create a program to determine the amount of net pay in the input of the basic salary plus the bonus amount is also entered. To find the bonus formula is the amount added bonus multiplied by the base salary. Net salary = salary + bonus amount. Hint: Use 5 different functions:
main ()
Input Data ()
bonus ()
net salary ()
total salary ()
===========================================================================
Buat Program untuk menentukan jumlah gaji bersih dari gaji pokok yang diinputkan ditambah dengan jumlah bonus juga diinputkan. Untuk mencari bonus rumusnya adalah jumlah bonus yang dimasukkan dikalikan dengan gaji pokok. Gaji bersih = gaji pokok + jumlah bonus. Petunjuk: Gunakan 5 macam fungsi:
main()
Input Data()
bonus ()
gaji bersih()
gaji total()

Script Program :

Tuesday, January 15, 2013

Function - Fungsi (6)

Make a program that can calculate the Factorial and Fibonacci from an input is entered!
===========================================================================
Buatlah sebuah program yang dapat menghitung Faktorial dan Fibonacci dari sebuah inputan yang dimasukkan!

Script Program :

Monday, January 14, 2013

Function - Fungsi (5)

Make a function that can display the permutation nPr!
===========================================================================
Buatlah sebuah fungsi yang dapat menampilkan Permutasi nPr!

Script Program :

Sunday, January 13, 2013

Function - Fungsi (4)

Recursive Function - Fungsi Rekursif

Script Program :

Screenshot :

Try It and Good Luck!!!

Saturday, January 12, 2013

Function - Fungsi (3)

Recursive Function - Fungsi Rekursif

Script Program :

Screenshot :

Try It and Good Luck!!!

Friday, January 11, 2013

Function - Fungsi (2)

Main Function - Fungsi Main

Script Program :

Screenshot :

Try It and Good Luck!!!

Thursday, January 10, 2013

Function - Fungsi (1)

Main Function - Fungsi Main
Script Program :

Screenshot :

Try It and Good Luck!!!

Wednesday, January 9, 2013

Array - Larik (8)

Program to show the Fibonacci numbers in the n-row! Fibonacci Numbers are numbers like: 1 1 2 3 5 8 13 ... etc. So if the input n = 7, then the result is 13
===========================================================================
Program untuk menampilkan bilangan fibonacci pada deret ke-n! Bilangan fibonacci adalah bilangan seperti: 1 1 2 3 5 8 13 ... dst. Jadi jika inputan n = 7, maka hasil adalah 13

Script Program :

Array - Larik (7)

Program with looping to display the results as follows :

===========================================================================
Program dengan looping untuk menampilkan hasil seperti berikut :
Script Program :

Array - Larik (6)

Program to analyze an input string that is entered by the user and then show:
a. How many characters are in the form of vocal characters (a, i, u, e, o)
b. How many non-vocal character and other characters

===========================================================================
Program untuk menganalisa sebuah string inputan yang diinputkan oleh user dan kemudian tampilkan:
a.    Berapa jumlah karakter yang berupa karakter vokal (a,i,u,e,o)
b.    Berapa jumlah karakter yang non vokal dan karakter-karakter lainnya

Script Program :

Array - Larik (5)

Make photocopies of the price chart 1-100 sheet, where the price is 80 dollars each sheet
===========================================================================
Buatlah tabel harga fotokopian dari 1 – 100 lembar, dimana harga per lembar adalah 80 rupiah.

Script Program :

Array - Larik (4)

Program to reverse the words, for example the word "Anton" will be "notna" using an array of char.
===========================================================================
Program untuk membalik kata, misalnya kata “anton“ akan menjadi “notna“ dengan menggunakan array of char.

Script Program :

Array - Larik (3)

Program to count the number of characters entered.
===========================================================================
Program yang dapat menghitung banyaknya karakter yang dimasukkan.

Script Program :

Array - Larik (2)

Program to enter a value (number) into the two-dimensional array and display it.
===========================================================================
Program untuk menginput nilai (bilangan) ke dalam array dimensi dua dan menampilkannya.

Script Program :

Array - Larik (1)

Program to enter the value of students into a one-dimensional array.
===========================================================================
Program untuk menginput nilai mahasiswa ke dalam array satu dimensi. 

Script Program :

Tuesday, January 8, 2013

Looping - Perulangan (7)

Make diamond numbers:
=========================================================================
Membuat diamond angka :
 
Script Program :

Looping - Perulangan (6)

Someone had a savings account at a bank of $10 (opening balance). Furthermore, he can put up or take the savings. Create a program with C + + for the purposes of the transaction at the bank. Display the main menu as follows:
--------------------------------------------------
PT. ISLAMIC BANK INDEPENDENT
--------------------------------------------------
Balance: ....
menu Transaction 
  1. Savings deposit
  2. take the Savings 
  3. Exit
Options menu (1/2/3)? ...
Conditions:
Banks make policies that minimum balance that must be left in account is $10
=========================================================================
Seseorang punya rekening tabungan di bank sebesar Rp. 10.000,- (saldo awal). Selanjutnya ia dapat menyetor atau mengambil tabungannya. Buatlah program dengan C++ untuk keperluan transaksi di bank tersebut. Tampilan menu utamanya sbb:
--------------------------------------------------
PT. BANK SYARIAH INDEPENDEN
--------------------------------------------------
Saldo : ....
Menu Transaksi :
  1. Setor Tabungan
  2.  Ambil Tabungan 
  3. Exit
Pilihan menu (1/2/3) ? ...
Ketentuan:
Bank membuat kebijakan bahwa saldo minimum yang harus disisakan di
rekening adalah Rp. 10.000,-
 
Script Program :

Looping - Perulangan (5)

Create a program with C + + to display all of the settlement of the equation x + y + z = 20. With x, y, z integer> = 0.
Sample output display:
-----------------------------
x y z
-----------------------------
0 0 20
0 1 19
0 2 18 etc

=========================================================================
Buatlah program dengan C++ untuk menampilkan semua penyelesaian dari persamaan x + y + z = 20. Dengan x, y, z bilangan bulat >= 0.
Contoh tampilan outputnya:
-----------------------------
x y z
-----------------------------
0 0 20
0 1 19
0 2 18 dst

 
Script Program :

Looping - Perulangan (4)

Make a simulation program to display the menu below using WHILE.
MENU OPTIONS
  1. Read data 
  2. Change data
  3. Remove data
  4. Exit
Your selection (1/2/3/4)?
If the selected menu No. 1, it will show the text "You choose menu 1". Similarly to menu 2 and 3. Then after it emerged the text "Press ENTER to return to the main menu". This means that once we press ENTER menu option will appear again, and so on. However, if the selected menu 4 (EXIT), the program stopped.
=========================================================================
Buatlah simulasi menu program dengan tampilan di bawah ini menggunakan WHILE.
MENU PILIHAN  
  1. Baca Data 
  2. Ubah Data  
  3. Hapus Data  
  4. Exit
Pilihan Anda (1/2/3/4) ?
Apabila dipilih menu no 1, maka akan tampil teks “Anda memilih menu 1”. Demikian pula untuk menu 2 dan 3. Kemudian setelah itu muncul teks “Tekan  ENTER untuk kembali ke menu utama”. Artinya begitu kita tekan ENTER menu  pilihan akan muncul kembali, dst. Akan tetapi bila yang dipilih menu 4 (EXIT), program langsung berhenti.
 
Script Program :

Looping - Perulangan (3)

DETERMINING PROGRAM NAME DAYOptions:A = C = MONDAY WEDNESDAY FRIDAY E = G = SundayTUESDAY B = D = F = THURSDAY SATURDAYEnter Code Day (A.. G):
=========================================================================
PROGRAM MENENTUKAN NAMA HARI
Pilihan:
A = SENIN C = RABU E = JUM’AT G = AHAD
B = SELASA D = KAMIS F = SABTU
Masukkan Kode Hari (A..G) :

Script Program :


Looping - Perulangan (2)

Make a simulation program to display the menu below using WHILE.MENU OPTIONS
  1. Read Data
  2. Change Data
  3. Remove Data
  4. Exit
Your selection (1/2/3/4)?If the selected menu No. 1, it will show the text "You choose menu 1". Similarly to menu 2 and 3. Then after it emerged the text "Press ENTER to return to the main menu". This means that once we press ENTER menu option will appear again, and so on. However, if the selected menu 4 (EXIT), the program stopped. 
=========================================================================
Buatlah simulasi menu program dengan tampilan di bawah ini menggunakan WHILE.
MENU PILIHAN
  1. Baca Data 
  2. Ubah Data 
  3. Hapus Data 
  4. Exit
Pilihan Anda (1/2/3/4) ?
Apabila dipilih menu no 1, maka akan tampil teks “Anda memilih menu 1”. Demikian pula untuk menu 2 dan 3. Kemudian setelah itu muncul teks “Tekan  ENTER untuk kembali ke menu utama”. Artinya begitu kita tekan ENTER menu  pilihan akan muncul kembali, dst. Akan tetapi bila yang dipilih menu 4 (EXIT), program langsung berhenti.

Script Program :

Looping - Perulangan (1)

Create a C + + program to create a triangle look like below using the FOR.********** 
*****etc
=========================================================================
Buatlah program C++ untuk membuat tampilan segitiga seperti di bawah ini menggunakan FOR.
*
* *
* * *
* * * *
* * * * * dst


Script Program :

Monday, January 7, 2013

Operating Conditions - Operasi Kondisi(6)

Making the switch program nested case - Membuat program dengan Switch case bersarang

Script Program :

Operating Conditions - Operasi Kondisi(5)

Draw flow charts and logic branching program using Switch-Case to perform calculations menu selection formulas: 
  1. Formulas Calculating Area of ​​a Triangle;
  2. Counting Formula Broad Beams:
  3. Calculating the temperature conversion formulas;
  4. Calculating the Area of ​​a Circle Formula.
  5. The formula to determine a leap year.
=========================================================================
Buatlah diagram alir dan program dengan menggunakan logika percabangan Switch- Case untuk melakukan pemilihan menu penghitungan rumus-rumus :
  1. Rumus Menghitung Luas Segitiga;
  2. Rumus Menghitung Luas Balok;
  3. Rumus Menghitung konversi suhu;
  4. Rumus Menghitung Luas Lingkaran.
  5. Rumus untuk mengetahui tahun kabisat.

Operating Conditions - Operasi Kondisi(4)

Create a program to help a UM professor of Electrical Engineering in determining the final grade students.
Conditions that must be done is as follows:
a. Terms of decision values​​:
    1. Value Pure Motivation = value multiplied by 20% keatifan
    2. Task Pure Value = value multiplied by 30% duty
    3. Exams = Pure Value multiplied by 50% test scores
    4. Final Value = Value + Value Test Pure Pure Pure Value + Duty liveliness.
b. The conversion value to the value of the number with the following letters:
    1. 0-44 Value = E
    2. 45-55 grade = D
    3. 56-65 grade = C
    4. 66-75 grade = B-
    5. 76-85 grade = B
    6. 86-90 grade = A-
    7. 91-100 value = A
c. Doing reinforcement to students with the following conditions:
    - Between 0 s / d 55 show the statement "you do not pass, increase your learning"
    - Between 56 s / d 65 show the statement "you pass, increase achievements"
    - Between 66 s / d 85 show the statement "you pass well, defend achievements"
    - Between 86 s / d 100 show the statement "you do not pass, EXCELLENT"

=========================================================================
Buatlah program untuk membantu seorang dosen Teknik Elektro UM dalam menentukan nilai akhir mahasiswa.
Ketentuan yang harus dilakukan adalah sebagai berikut :
a. Ketentuan pengambilan nilai :
    1. Nilai Murni Keaktifan = nilai keatifan dikalikan 20 %
    2. Nilai Murni Tugas = nilai tugas dikalikan 30%
    3. Nilai Murni Ujian = nilai ujian dikalikan 50%
    4. Nilai Akhir = Nilai Murni Ujian + Nilai Murni Tugas + Nilai Murni Keaktifan.
b. Melakukan konversi Nilai angka ke nilai Huruf dengan ketentuan sebagai berikut :
    1. 0 – 44 nilai = E
    2. 45- 55 nilai = D
    3. 56- 65 nilai = C
    4. 66- 75 nilai = B-
    5. 76-85 nilai = B
    6. 86- 90 nilai = A-
    7. 91-100 nilai = A
c. Melakukan penguatan kepada mahasiswa dengan ketentuan sebagai berikut :
    - antara 0 s/d 55 tampilkan pernyataan “Anda tidak lulus, tingkatkan belajar anda”
    - antara 56 s/d 65 tampilkan pernyataan “Anda lulus, tingkatkan prestasimu”
    - antara 66 s/d 85 tampilkan pernyataan “Anda lulus dengan baik, pertahankan prestasimu”
    - antara 86 s/d 100 tampilkan pernyataan “Anda tidak lulus, EXCELLENT”

Operating Conditions - Operasi Kondisi(3)

A company by the name of "HALAL PROSPER SENTOSA" pays a commission to the salesmannya with the following conditions:
  1. if the salesman can sell up to $20, then it will be money services by $10. plus commissions 10% of the income earned that day.
  2. if the salesman can sell over $20 items, there will be fees for $20, plus the commission 15% of the income earned on that day.
  3. if the salesman can sell over $50 items, there will be fees for $30, plus the commission 20% of the income earned on that day.
  4. companies that want to make a program with labels also include the company name, the name of the cashier and salesman.
=========================================================================
Suatu Perusahaan dengan nama ”SEJAHTERA HALAL SENTOSA” memberikan komisi kepada para salesmannya dengan ketentuan sebagai berikut:
  1. bila salesman dapat menjual barang hingga Rp.20.000, maka akan diberikan uang jasa sebesar Rp.10.000. ditambah dengan komisi Rp. 10% dari pendapatan yang diperoleh hari itu. 
  2. bila salesman dapat menjual barang diatas Rp.20.000, maka akan diberikan uang jasa sebesar Rp.20.000, ditambah dengan uang komisi Rp.15% dari pendapatan yang diperoleh pada hari itu.
  3. bila salesman dapat menjual barang diatas Rp.50.000, maka akan diberikan uang jasa sebesar Rp.30.000, ditambah dengan uang komisi Rp.20% dari pendapatan yang diperoleh pada hari itu. 
  4. perusahaan itu ingin anda membuatkan program dengan mencantumkan juga label nama perusahaan, nama kasir dan salesman.

Operating Conditions - Operasi Kondisi(2)

A store with the name "GEMA INSANI" in serving customers, have
provisions in providing discounted prices. Where the rebate amount from the purchase of goods are as follows: 
  1. If your total purchase is less than $50, the piece received 5% of total purchases. 
  2. If your total purchase is more or equal to $50 bits received by 20% of the total purchases. 
  3. Consumers want to make a program with labels also include stores, cashiers and buyers name.
=========================================================================
Sebuah toko dengan nama ”GEMA INSANI ”, dalam melayani pembeli, mempunyai
ketentuan dalam memberikan potongan harga. Dimana besarnya potongan harga dari pembelian barang adalah sebagai berikut:
  1. Jika total pembelian barang kurang dari Rp.50.000, maka potongan yang diterima sebesar 5% dari total pembelian.
  2. Jika total pembelian barang lebih atau sama dengan Rp.50.000 potongan yang diterima sebesar 20% dari total pembelian.
  3. Konsumen ingin anda membuatkan program dengan mencantumkan juga label toko, nama kasir dan pembeli.

Operating Conditions - Operasi Kondisi(1)

A store with the name "HALAL MAKMUR JAYA," in serving customers, have provisions in providing discounted prices. Where the rebate amount from the purchase of goods are as follows:
  1. No deductions if the total purchase is less than $50
  2. If the total purchase is greater than or equal to $50 pieces are accepted by 20% of the total   purchases. 
  3. Consumers want to make a program with labels also include stores, cashiers and buyers name. 
=========================================================================
Sebuah toko dengan nama ”HALAL MAKMUR JAYA”, dalam melayani pembeli, mempunyai ketentuan dalam memberikan potongan harga. Dimana besarnya potongan harga dari pembelian barang adalah sebagai berikut:
  1. Tidak ada potongan jika total pembelian kurang dari Rp.50.000 
  2. Jika total pembelian lebih dari atau sama dengan Rp.50.000 potongan yang diterima sebesar 20% dari total pembelian. 
  3. Konsumen ingin anda membuatkan program dengan mencantumkan juga label toko, nama kasir dan pembeli.  

Simple Calculator - Kalkulator Sederhana


Creating a simple calculator which there are arithmetic operators, logical and bitwise - Membuat kalkulator sederhana yang di dalamnya terdapat operator aritmatika, logika dan bitwise

Script Program :

Friday, January 4, 2013

Thursday, January 3, 2013

Temperature Conversion - Konversi Suhu Celsius menjadi Reamur, Fahrenheit, Kelvin

A. Entering data Celsius - Memasukkan data Celcius
Script Program :
Screenshot :
 
B. Displays the conversion option  - Menampilkan pilihan konversi
Script Program :