Sabtu, 25 Juni 2011

Nikah Sesama Jenis

KASUS pernikahan sesama jenis kembali terjadi di negeri kita. Jika sebelumnya kita dikejutkan dengan pernikahan Muhammad Umar dengan Fransiska Anastasya Oktaviany alias Rahmat--keduanya berjenis kelamin laki-laki--kali ini kita dikejutkan dengan pernikahan sesama perempuan. 

Adalah Sri Sunarsiah alias Eriqi Prakarsa Syahputra bin (binti) Bambang Supeno (22) warga Desa Buket Tanjong Karang Kecamatan Karang Baru yang berpura-pura sebagai lelaki menjalin cinta dengan Dian Mariam binti Mustaqin (21) warga Dusun Inpres Desa Paya Bedi, Kecamatan Rantau hingga berlanjut ke pelaminan. 

Dalam perspektif fikih ada tiga hal yang berkaitan dengan perilaku penyimpangan seksual yaitu, pertama, liwath (homoseksual) adalah sebuah hubungan khusus yang dilakukan antara lelaki dan lelaki. Praktik liwath sangat dibenci dalam kaca mata agama karena tidak ditemukan praktik liwath dilakukan binatang. Manusia yang melakukan praktik liwath lebih hina dari seekor binatang. Para fuqaha berbeda persepsi dalam menjatuhkan hukuman terhadap pelaku liwath. Jumhur Syafiiah berpendapat hukuman liwath sama dengan hukuman zina.

Kedua, musahaqah (lesbian) adalah sebuah istilah fikih yang disematkan bagi wanita yang orientasi seksualnya mengarah kepada sesama wanita. Pelaku musahaqah adalah gay-nya wanita. Para fuqaha sepakat tentang hukuman terhadap pelaku musahaqah, yaitu ta’zir (hukuman yang tidak berkaitan dengan hudud dan qisas), hukuman ta’zir bertujuan agar pelaku tidak lagi mengulangi kejahatan dan menjadi pelajaran kepada orang lain supaya tidak meniru kejahatan yang dilakukan pelaku, bukan bertujuan untuk menyiksa.

Ketiga, Ityanul Bahaim (Bestialiti) adalah hubungan seksual yang dilakukan manusia dengan binatang. Dalam kasus bestialiti jumhur ulama memberikan vonis hukuman ta’zir. Hukuman bagi pelaku bestialiti adalah al-qatlu (bunuh) pelaku dan sembelih binatang.

Dari tiga perilaku penyimpangan seksual dalam perspektif fikih, lesbianlah yang paling sukar untuk dideteksi. Dalam berinteraksi dengan masyarakat kebanyakan pelaku lesbian tidak menunjukkan hal-hal yang mencurigakan dan terkesan normal. Berbeda dengan pelaku liwath dan pelaku bestialiti. Dari segi fisik pelaku liwath terlihat sangat mencolok baik pakaian yang digunakan maupun tingkah laku. Islam melarang berbagai bentuk penyimpangan seksual karena menyalahi dengan fitrah dan naluri kemanusian. Nikah adalah solusi yang diberikan untuk menyalurkan nafsu biologis seorang insan. Selain itu nikah juga mempunyai tiga tujuan mulia, pertama: sakinah (menentramkan hati). Sebuah kesuksesan berawal dari hati yang damai dan tentram. Dengan menikah segala bentuk khayalan pada masa puber dapat disalurkan sehingga dengan hati yang damai dan tentram semua aktifitas akan mudah diselesaikan. 

Kedua, mawaddah (saling setia terhadap pasangan). Merasakan terluka ketika orang yang kita cintai dalam kondisi duka. Mawaddah hanya bisa didapat melalui jalur pernikahan. Sikap setia akan timbul jika semua prosedur sudah terpenuhi. Salah satu prosedur dalam nikah adalah adanya wali nikah sehingga memberi kesan bahwa seluruh keluarga telah memberikan restu terhadap pernikahan yang diwakili oleh seorang insan yang bernama ayah.

Ketiga, rahmah (saling menyayangi). Rasa sayang muncul dari lubuk hati yang paling dalam bukan karena dorongan hasrat biologis. Sikap Rahmah bukan hanya timbul terhadap pasangan saja namun juga kepada semua keluarga. Perasaan sakinah mawaddah wa rahhmah adalah tujuan inti dari makna pernikahan. Tujuan inti ini tidak bisa ditempuh dengan cara lain selain pernikahan. Sedangkan pelaku liwath dan lesbian tidak akan pernah mendapati perasaan sakinah mawaddah warahmah karena memang tidak mungkin untuk menciptakan keturunan.

Sejarah pernikahan pasangan musahaqah (lesbian) yang diresmikan langsung oleh negara terjadi di negara bagian Washington, Distrik Colombia, dilakukan oleh pasangan non-muslim, pdt Darlene Garner (61) dan pdt Candy Holmes (53), pasangan yang merupakan pemimpin gereja yang bergerak dalam memperjuangakan hak kamu gay, lesbian, dan transgender. Perkawinan pdt Darlene Garner dan pdt Candy Holmes mendapat sambutan hangat dari para tamu undangan. Bahkan dalam waktu yang sama perkawinan dua mempelai lesbian lain juga ikut diresmikan.

 Kenapa terjadi di Aceh?
Kasus pernikahan sesama jenis antara Eriqi Prakarsa Syahputra dengan Dian Mariam binti Mustaqin, membuktikan bahwa tingkat pemahaman masyarakat Aceh terhadap syariah masih jauh dari standar. Padahal fikih sudah mengatur dengan sangat rapi terhadap hal-hal yang berkaitan dengan ikatan perkawinan. Masih kurangnya pemahaman masyarakat Aceh terhadap syariah Islam khususnya masalah perkawinan berakibat fatal sehingga munculnya kasus pernikahan sesama jenis yang membuat luka dan aib semua pihak.

Agar tidak terjadinya efek negatif yang tidak diinginkan dalam menjalani sebuah bahtera rumah tangga fikih sudah memberikan alternatif yang terbaik dimulai dari khitbah atau meminang. Masa khitbah merupakan tahap taaruf untuk saling mengenali pribadi antara calon suami dan calon istri. Sedangkan untuk mengetahui hal-hal yang sifatnya pribadi, dianjurkan bagi setiap famili laki-laki dari pihak wanita untuk menyelidiki lebih jauh, begitu juga sebaliknya. Sehingga kasus-kasus penipuan dalam perkawinan bisa diminimalisir. 

Kasus pernikahan Eriqi Prakarsa Syahputra dengan Dian Mariam binti Mustaqin harus menjadi pelajaran kepada semua pihak. KUA, dinas kependudukan, keucik, dan semua unsur yang terlibat dalam proses perkawinan untuk lebih memperketat penyeleksian calon mempelai yang ingin melabuhkan bahtera rumah tangga. Pengalaman harus dijadikan pelajaran agar ke depan tidak terjadi lagi pernikahan sejenis baik dalam bentuk penipuan apalagi berlandaskan dasar suka sama suka. Sedikit lengah, bukan tidak mustahil akan muncul Eriqi lainya di Aceh dengan korban yang berbeda.

Minggu, 19 Juni 2011

masalah projek if

Manajemen projek
􀂄 Fokus: SDM, masalah, proses
􀂄 SDM:
􀂅 Rekrutmen, selection, manajemen kinerja, training,
compensation, pengembangan karir, organisasi dan
rencana kerja, dan pengembangan tim/kultur
􀂄 Masalah:
􀂅 menetapkan lingkup, tujuan dan sasaran projek
􀂅 mencari alternatif solusi
􀂅 dekomposisi masalah
􀂅 identifikasi teknis dan konstrain manajemen

Sabtu, 11 Juni 2011

Pengenalan Bahasa Pemrograman C++

Pengenalan Bahasa Pemrograman C++

November 06, 2009 By: imadewira Category: Algo dan SD I
Contoh program C++ :
1//program02.cpp
2#include <iostream.h>
3void main()
4{
5      cout<<"Hai. Selamat belajar C++";
6}
Program diatas dapat kita simpan dengan nama “program02.cpp“.
Fungsi main()
Program C++ tidak dapat dipisahkan dari fungsi karena fungsi adalah salah satu dasar penyusun blok pada C++. Sebuah program C++ minimal mengandung sebuah fungsi yaitu fungsi main().
Fungsi ini menjadi awal dan akhir eksekusi program C++. main adalah nama judul fungsi. Dimulai dari tanda { sampai dengan } disebut tubuh fungsi, atau semua yang terletak didalam tanda {} disebut blok.
Tanda () digunakan untuk mengapit argumen fungsi, yaitu nilai yang akan dilewatkan ke fungsi. Kata void yang mendahului main() dipakai untuk menyatakan bahwa fungsi ini tidak mempunyai nilai balik (return value). Di dalam tanda {} bisa terkandung sejumlah unit yang disebut pernyataan (statement).
Pernyataan
Perhatikan baris kode dibawah ini :
1cout<<“Hai. Selamat belajar C++”;
Baris tersebut merupakan sebuah pernyataan yang digunakan untuk menampilkan tulisan yang terletak pada sepasang tanda petik ganda ke layar. Tulisan yang terletak pada sepasang tanda petik ganda disebut string. Setiap pernyataan harus diakhiri dengan tanda titik koma (;).
Mengenal cout
Pengenal cout merupakan sebuah obyek yang disediakan oleh C++ untuk mengarahkan data ke standard output (normalnya layar). Tanda << merupakan operator yang disebut operator “penyisipan / peletakan”.
1cout<<“Hai. Selamat belajar C++”;
Operator ini mengarahkan operand (data) yang di sebelah kanannya ke obyek yang dikirinya. Pada contoh diatas, string “Hai. Selamat belajar C++” diarahkan ke cout yang memberikan hasil berupa tampilan string tersebut ke layar.
#include <iostream.h>
Baris tersebut bukanlah sebuah pernyataan, itulah sebabnya tidak diakhiri dengan tanda titik koma. Baris tersebut menginstruksikan kepada kompiler untuk menyisipkan file lain (iostream.h) saat program dikompilasi. File-file berakhiran .h disebut file header, yaitu file-file yang berisi berbagai deklarasi seperti fungsi, variabel, dll.

Jumat, 10 Juni 2011

ilmu computer

Search And Insert Problem (Sorted Double Linkedlist Solution)

Author: Fadlika Dita Nurjanto · Published: June 5, 2011 · Category: Algoritma, Pemograman, Tool, Pemrograman C, Pemrograman C++

Problem Search And Insert merupakan salah satu problem yang banyak digunakan dalam kehidupan sehari-hari. Proses dalam Search And Insert adalah mengecek sebuah angka yang diberikan. Jika angka yang dimasukkan telah ada di dalam daftar, maka tidak perlu melakukan apa-apa. Akan tetapi jika angka yang diberikan tidak ada di dalam daftar, maka angka tersebut harus dimasukkan [...]

Instalasi dan Setting OpenGL Pada Microsoft Visual C++ 6.0

Author: Mudafiq Riyan Pratama · Published: April 13, 2011 · Category: Grafik, Disain dan Publishing, Pemrograman C++

OpenGL (Open Graphics Library) adalah suatu library grafis standard yang digunakan untuk keperluan-keperluan pemrograman grafis. Spesifikasi standar yang dimiliki oleh library ini mendefinisikan sebuah cross-bahasa, cross-platform API untuk menulis aplikasi komputer dalam bentuk 2D dan 3D grafis. OpenGL ini sifatnya open source, dapat dipakai pada banyak platform (Windows ataupun Linux) dan dapat digunakan pada berbagai [...]

Tutorial Compiler Bahasa-C Dengan Anjuta IDE


Pada kesempatan kali ini kita akan membahas mengenai cara penggunaan Anjuta IDE sebagai compiler bahasa C pada sistem operasi linux. Linux sendiri merupakan suatu sistem operasi yang berbasis open source sehingga dapat kita modifikasi sesuai keinginan kita termasuk menginstall program – program tertentu. Indeks : A. Overview B. Langkah – langkah Menggunakan Anjuta IDE C. [...]

Pemrograman C++ (Part III)

Author: wirman · Published: June 9, 2009 · Category: Pemrograman C++

Akhirnya part III sudah selesai. Toong kasih kritik ya (klo ada ) Download Tulisan Lengkap: wirman-pemrogramanC++.doc (part III)

Pemrograman dengan C++ (part II)

Author: wirman · Published: May 20, 2009 · Category: Pemrograman C++

Pada artikel ini akan membahas sekitar looping terlebih dahulu. Download Tulisan Lengkap: wirman – C++ (II)

Pemrograman dengan C++ (part I)

Author: wirman · Published: March 16, 2009 · Category: Pemrograman C++

Kali ini akan saya coba bahas mengenai pemrograman C++. Ini merupakan bagian pertama dari pembahasan C++. Nantikan “episode” berikutnya ya… D Download TulisanLengkap: wirman-c++ (I).doc

Membuat Aplikasi Ponsel dengan Visual C++

Author: Administrator · Published: November 25, 2008 · Category: Pemrograman C++

Ponsel yang ada dipasaran saat ini sebagian besar menggunakan Sistem Operasi Symbian. Disini akan dibahas mengenai apa itu Symbian dan bagaimana membuat aplikasinya dengan menggunakan Visul C++. Sama seperti Microsoft Windows sebagai sistem operasi yang paling banyak digunakan untuk komputer, demikian juga dengan Symbian yang merupakan sistem operasi yang paling banyak digunakan untuk ponsel. Sampai [...]

Membuat Aplikasi Ponsel dengan Visual C++

Author: Administrator · Published: November 25, 2008 · Category: Pemrograman C++

Ponsel yang ada dipasaran saat ini sebagian besar menggunakan Sistem Operasi Symbian. Disini akan dibahas mengenai apa itu Symbian dan bagaimana membuat aplikasinya dengan menggunakan Visul C++. Sama seperti Microsoft Windows sebagai sistem operasi yang paling banyak digunakan untuk komputer, demikian juga dengan Symbian yang merupakan sistem operasi yang paling banyak digunakan untuk ponsel. Sampai [...]

Tips C++: Penggunaan Template

Author: Administrator · Published: November 25, 2008 · Category: Pemrograman C++

Dalam pemrograman , terutama yang sangat tergantung pada tipe variable , sering kali kita direpotkan dengan harus membuat fungsi yang berfungsi sama tapi dengan tipe variable berbeda.Untuk itu pada C++ dikeluarkan lah sebuah keyword baru , yaitu template. Dengan penggunaan template kita bisa membuat sebuah fungsi yang bisa mendukung segala macam tipe variable , tidak [...]

Rabu, 08 Juni 2011

IF dan C++

C++ Syntax: if (args)

Description

The if statement has the form:-
if ( expression ) statement
If the expression evaluates to true (not zero) the following statement, which is normally a compound statement is executed. An optional else statement may follow immediately (no intervening statements), for example:- &amp;lt;br&amp;gt;if ( a &amp;amp;amp;gt; b ) print " a &amp;amp;amp;gt; b\n";&amp;lt;br&amp;gt;else print "a &amp;amp;amp;lt;= b\n";&amp;lt;br&amp;gt;

Usage Notes

Alternatives to if (args)

The switch statement is a good way to perform a multi-way branch on a single value.

Multi-way ifs

There is no elseif statement. To make a multi-way branch use a set of nested ifs, for example:- &amp;lt;br&amp;gt;if ( a &amp;amp;amp;gt; b ) print "a &amp;amp;amp;gt; b\n";&amp;lt;br&amp;gt;else if (a == b ) print "a == b\n";&amp;lt;br&amp;gt;else print "a &amp;amp;amp;lt; b\n";&amp;lt;br&amp;gt; Note in the above example that the else statement must belong to the second if (the first if has an intervening statement). To be able to match an else to an outer if requires the use of a compound statement e.g.:- &amp;lt;br&amp;gt;if ( a &amp;amp;amp;gt;= b ) {&amp;lt;br&amp;gt; if (a == b ) print "a == b\n";&amp;lt;br&amp;gt; else print "a &amp;amp;amp;gt; b\n";&amp;lt;br&amp;gt;}&amp;lt;br&amp;gt;

C++ Syntax: if (args)

Description

The if statement has the form:-
if ( expression ) statement
If the expression evaluates to true (not zero) the following statement, which is normally a compound statement is executed. An optional else statement may follow immediately (no intervening statements), for example:- &amp;lt;br&amp;gt;if ( a &amp;amp;amp;gt; b ) print " a &amp;amp;amp;gt; b\n";&amp;lt;br&amp;gt;else print "a &amp;amp;amp;lt;= b\n";&amp;lt;br&amp;gt;

Usage Notes

Alternatives to if (args)

The switch statement is a good way to perform a multi-way branch on a single value.

Multi-way ifs

There is no elseif statement. To make a multi-way branch use a set of nested ifs, for example:- &amp;lt;br&amp;gt;if ( a &amp;amp;amp;gt; b ) print "a &amp;amp;amp;gt; b\n";&amp;lt;br&amp;gt;else if (a == b ) print "a == b\n";&amp;lt;br&amp;gt;else print "a &amp;amp;amp;lt; b\n";&amp;lt;br&amp;gt; Note in the above example that the else statement must belong to the second if (the first if has an intervening statement). To be able to match an else to an outer if requires the use of a compound statement e.g.:- &amp;lt;br&amp;gt;if ( a &amp;amp;amp;gt;= b ) {&amp;lt;br&amp;gt; if (a == b ) print "a == b\n";&amp;lt;br&amp;gt; else print "a &amp;amp;amp;gt; b\n";&amp;lt;br&amp;gt;}&amp;lt;br&amp;gt;

C++ Syntax: if (args)

Description

The if statement has the form:-
if ( expression ) statement
If the expression evaluates to true (not zero) the following statement, which is normally a compound statement is executed. An optional else statement may follow immediately (no intervening statements), for example:- &amp;lt;br&amp;gt;if ( a &amp;amp;amp;gt; b ) print " a &amp;amp;amp;gt; b\n";&amp;lt;br&amp;gt;else print "a &amp;amp;amp;lt;= b\n";&amp;lt;br&amp;gt;

Usage Notes

Alternatives to if (args)

The switch statement is a good way to perform a multi-way branch on a single value.

Multi-way ifs

There is no elseif statement. To make a multi-way branch use a set of nested ifs, for example:- &amp;lt;br&amp;gt;if ( a &amp;amp;amp;gt; b ) print "a &amp;amp;amp;gt; b\n";&amp;lt;br&amp;gt;else if (a == b ) print "a == b\n";&amp;lt;br&amp;gt;else print "a &amp;amp;amp;lt; b\n";&amp;lt;br&amp;gt; Note in the above example that the else statement must belong to the second if (the first if has an intervening statement). To be able to match an else to an outer if requires the use of a compound statement e.g.:- &amp;lt;br&amp;gt;if ( a &amp;amp;amp;gt;= b ) {&amp;lt;br&amp;gt; if (a == b ) print "a == b\n";&amp;lt;br&amp;gt; else print "a &amp;amp;amp;gt; b\n";&amp;lt;br&amp;gt;}&amp;lt;br&amp;gt;else print "a &amp;amp;amp;lt; b\n";&amp;lt;br&amp;gt; Now the second if is hidden inside the compound statement and the second else is the next statement after the first if. Also note how important it is to align statements to improve readability!
Go Back to the The C++ Crib Top Page

If you have any comments about this page please send them to Nick West
else print "a &amp;amp;amp;lt; b\n";&amp;lt;br&amp;gt; Now the second if is hidden inside the compound statement and the second else is the next statement after the first if. Also note how important it is to align statements to improve readability!
Go Back to the The C++ Crib Top Page

If you have any comments about this page please send them to Nick West
else print "a &amp;amp;amp;lt; b\n";&amp;lt;br&amp;gt; Now the second if is hidden inside the compound statement and the second else is the next statement after the first if. Also note how important it is to align statements to improve readability!
Go Back to the The C++ Crib Top Page

If you have any comments about this page please send them to Nick West

Senin, 06 Juni 2011

MATERI C++

Search And Insert Problem (Sorted Double Linkedlist Solution)

Author: Fadlika Dita Nurjanto · Published: June 5, 2011 · Category: Algoritma, Pemograman, Tool, Pemrograman C, Pemrograman C++

Problem Search And Insert merupakan salah satu problem yang banyak digunakan dalam kehidupan sehari-hari. Proses dalam Search And Insert adalah mengecek sebuah angka yang diberikan. Jika angka yang dimasukkan telah ada di dalam daftar, maka tidak perlu melakukan apa-apa. Akan tetapi jika angka yang diberikan tidak ada di dalam daftar, maka angka tersebut harus dimasukkan [...]

Instalasi dan Setting OpenGL Pada Microsoft Visual C++ 6.0

Author: Mudafiq Riyan Pratama · Published: April 13, 2011 · Category: Grafik, Disain dan Publishing, Pemrograman C++

OpenGL (Open Graphics Library) adalah suatu library grafis standard yang digunakan untuk keperluan-keperluan pemrograman grafis. Spesifikasi standar yang dimiliki oleh library ini mendefinisikan sebuah cross-bahasa, cross-platform API untuk menulis aplikasi komputer dalam bentuk 2D dan 3D grafis. OpenGL ini sifatnya open source, dapat dipakai pada banyak platform (Windows ataupun Linux) dan dapat digunakan pada berbagai [...]

Tutorial Compiler Bahasa-C Dengan Anjuta IDE


Pada kesempatan kali ini kita akan membahas mengenai cara penggunaan Anjuta IDE sebagai compiler bahasa C pada sistem operasi linux. Linux sendiri merupakan suatu sistem operasi yang berbasis open source sehingga dapat kita modifikasi sesuai keinginan kita termasuk menginstall program – program tertentu. Indeks : A. Overview B. Langkah – langkah Menggunakan Anjuta IDE C. [...]

Pemrograman C++ (Part III)

Author: wirman · Published: June 9, 2009 · Category: Pemrograman C++

Akhirnya part III sudah selesai. Toong kasih kritik ya (klo ada ) Download Tulisan Lengkap: wirman-pemrogramanC++.doc (part III)

Pemrograman dengan C++ (part II)

Author: wirman · Published: May 20, 2009 · Category: Pemrograman C++

Pada artikel ini akan membahas sekitar looping terlebih dahulu. Download Tulisan Lengkap: wirman – C++ (II)

Pemrograman dengan C++ (part I)

Author: wirman · Published: March 16, 2009 · Category: Pemrograman C++

Kali ini akan saya coba bahas mengenai pemrograman C++. Ini merupakan bagian pertama dari pembahasan C++. Nantikan “episode” berikutnya ya… D Download TulisanLengkap: wirman-c++ (I).doc

Membuat Aplikasi Ponsel dengan Visual C++

Author: Administrator · Published: November 25, 2008 · Category: Pemrograman C++

Ponsel yang ada dipasaran saat ini sebagian besar menggunakan Sistem Operasi Symbian. Disini akan dibahas mengenai apa itu Symbian dan bagaimana membuat aplikasinya dengan menggunakan Visul C++. Sama seperti Microsoft Windows sebagai sistem operasi yang paling banyak digunakan untuk komputer, demikian juga dengan Symbian yang merupakan sistem operasi yang paling banyak digunakan untuk ponsel. Sampai [...]

Membuat Aplikasi Ponsel dengan Visual C++

Author: Administrator · Published: November 25, 2008 · Category: Pemrograman C++

Ponsel yang ada dipasaran saat ini sebagian besar menggunakan Sistem Operasi Symbian. Disini akan dibahas mengenai apa itu Symbian dan bagaimana membuat aplikasinya dengan menggunakan Visul C++. Sama seperti Microsoft Windows sebagai sistem operasi yang paling banyak digunakan untuk komputer, demikian juga dengan Symbian yang merupakan sistem operasi yang paling banyak digunakan untuk ponsel. Sampai [...]

Tips C++: Penggunaan Template

Author: Administrator · Published: November 25, 2008 · Category: Pemrograman C++

Dalam pemrograman , terutama yang sangat tergantung pada tipe variable , sering kali kita direpotkan dengan harus membuat fungsi yang berfungsi sama tapi dengan tipe variable berbeda.Untuk itu pada C++ dikeluarkan lah sebuah keyword baru , yaitu template. Dengan penggunaan template kita bisa membuat sebuah fungsi yang bisa mendukung segala macam tipe variable , tidak [...]

Aplikasi Pocket PC dengan E-Visual C++

Author: Administrator · Published: November 25, 2008 · Category: Komputasi Bergerak, Pemrograman C++

Keunggulan utama dari Windows CE / Pocket PC adalah kompatibilitas dengan Microsoft Windows dalam komunikasi data, penanganan transfer file, sinkronisasi, dan akses database sehingga Pocket PC dengan berbasis Windows CE sudah mulai dipakai pada beberapa PDA (Personal Digital Assistant) terbaru. Source code dan software yang digunakan pada artikel – artikel ini menggunakan Embedded Visual C++ [...]

Jumat, 03 Juni 2011

c++ dan masalah IF

The if-else Statement

The if statement controls conditional branching.
if ( expression )
   statement1
[else
   statement2]
If the value of expression is nonzero, statement1 is executed. If the optional else is present, statement2 is executed if the value of expression is zero. expression must be of arithmetic or pointer type, or it must be of a class type that defines an unambiguous conversion to an arithmetic or pointer type. (For information about conversions, see Standard Conversions.)
In both forms of the if statement, expression, which can have any value except a structure, is evaluated, including all side effects. Control passes from the if statement to the next statement in the program unless one of the statements contains a break, continue, or goto.
The else clause of an if...else statement is associated with the closest previous if statement that does not have a corresponding else statement.
For example:
// if_esle_statement.cpp
#include <stdio.h>
int main()
{
   int x = 0;
   if( 1 )         // if statement #1
   {
      if( !x )      // if statement #2
         printf("!x\n");
      else                  //paired with if statement #2
         printf("x\n");
   }

The if-else Statement

The if statement controls conditional branching.
if ( expression )
   statement1
[else
   statement2]
If the value of expression is nonzero, statement1 is executed. If the optional else is present, statement2 is executed if the value of expression is zero. expression must be of arithmetic or pointer type, or it must be of a class type that defines an unambiguous conversion to an arithmetic or pointer type. (For information about conversions, see Standard Conversions.)
In both forms of the if statement, expression, which can have any value except a structure, is evaluated, including all side effects. Control passes from the if statement to the next statement in the program unless one of the statements contains a break, continue, or goto.
The else clause of an if...else statement is associated with the closest previous if statement that does not have a corresponding else statement.
For example:
// if_esle_statement.cpp
#include <stdio.h>
int main()
{
   int x = 0;
   if( 1 )         // if statement #1
   {
      if( !x )      // if statement #2
         printf("!x\n");
      else                  //paired with if statement #2
         printf("x\n");
   }

The if-else Statement

The if statement controls conditional branching.
if ( expression )
   statement1
[else
   statement2]
If the value of expression is nonzero, statement1 is executed. If the optional else is present, statement2 is executed if the value of expression is zero. expression must be of arithmetic or pointer type, or it must be of a class type that defines an unambiguous conversion to an arithmetic or pointer type. (For information about conversions, see Standard Conversions.)
In both forms of the if statement, expression, which can have any value except a structure, is evaluated, including all side effects. Control passes from the if statement to the next statement in the program unless one of the statements contains a break, continue, or goto.
The else clause of an if...else statement is associated with the closest previous if statement that does not have a corresponding else statement.
For example:
// if_esle_statement.cpp
#include <stdio.h>
int main()
{
   int x = 0;
   if( 1 )         // if statement #1
   {
      if( !x )      // if statement #2
         printf("!x\n");
      else                  //paired with if statement #2
         printf("x\n");
   }
}
}
}

Rabu, 01 Juni 2011

MASALAH IF DAN IF

If and only if

From Wikipedia, the free encyclopedia
Jump to: navigation, search
↔ ⇔ ≡
Logical symbols
representing iff.
In logic and related fields such as mathematics and philosophy, if and only if (shortened iff) is a biconditional logical connective between statements.
In that it is biconditional, the connective can be likened to the standard material conditional ("only if," equal to "if ... then") combined with its reverse ("if"); hence the name. The result is that the truth of either one of the connected statements requires the truth of the other, i.e., either both statements are true, or both are false. It is controversial whether the connective thus defined is properly rendered by the English "if and only if", with its pre-existing meaning. Of course, there is nothing to stop us stipulating that we may read this connective as "only if and if", although this may lead to confusion.
In writing, phrases commonly used, with debatable propriety, as alternatives to "if and only if" include Q is necessary and sufficient for P, P is equivalent (or materially equivalent) to Q (compare material implication), P precisely if Q, P precisely (or exactly) when Q, P exactly in case Q, and P just in case Q. Many authors regard "iff" as unsuitable in formal writing; others use it freely.[citation needed]
In logic formulae, logical symbols are used instead of these phrases; see the discussion of notation.

Contents

[hide]

[edit] Definition

The truth table of p ↔ q is as follows:[1]
Iff
p q
pq
T T T
T F F
F T F
F F T
Note that it is equivalent to that produced by the XNOR gate, and opposite to that produced by the XOR gate.

[edit] Usage

[edit] Notation

The corresponding logical symbols are "↔", "⇔" and "≡", and sometimes "iff". These are usually treated as equivalent. However, some texts of mathematical logic (particularly those on first-order logic, rather than propositional logic) make a distinction between these, in which the first, ↔, is used as a symbol in logic formulas, while ⇔ is used in reasoning about those logic formulas (e.g., in metalogic). In Łukasiewicz's notation, it is the prefix symbol 'E'.
Another term for this logical connective is exclusive nor.

[edit] Proofs

In most logical systems, one proves a statement of the form "P iff Q" by proving "if P, then Q" and "if Q, then P" (or the inverse of "if P, then Q", i.e. "if not Q, then not P"). Proving this pair of statements sometimes leads to a more natural proof, since there are not obvious conditions in which one would infer a biconditional directly. An alternative is to prove the disjunction "(P and Q) or (not-P and not-Q)", which itself can be inferred directly from either of its disjuncts — that is, because "iff" is truth-functional, "P iff Q" follows if P and Q have both been shown true, or both false.

[edit] Origin of iff

Usage of the abbreviation "iff" first appeared in print in John L. Kelley's 1955 book General Topology.[2] Its invention is often credited to Paul Halmos, who wrote "I invented 'iff,' for 'if and only if'—but I could never believe I was really its first inventor."[3]

[edit] Distinction from "if" and "only if"

"If the pudding is a custard, then Madison will eat it." or "Madison will eat the pudding if it is a custard." (equivalent to "Only if Madison will eat the pudding, is it a custard.")

If and only if

From Wikipedia, the free encyclopedia
Jump to: navigation, search
↔ ⇔ ≡
Logical symbols
representing iff.
In logic and related fields such as mathematics and philosophy, if and only if (shortened iff) is a biconditional logical connective between statements.
In that it is biconditional, the connective can be likened to the standard material conditional ("only if," equal to "if ... then") combined with its reverse ("if"); hence the name. The result is that the truth of either one of the connected statements requires the truth of the other, i.e., either both statements are true, or both are false. It is controversial whether the connective thus defined is properly rendered by the English "if and only if", with its pre-existing meaning. Of course, there is nothing to stop us stipulating that we may read this connective as "only if and if", although this may lead to confusion.
In writing, phrases commonly used, with debatable propriety, as alternatives to "if and only if" include Q is necessary and sufficient for P, P is equivalent (or materially equivalent) to Q (compare material implication), P precisely if Q, P precisely (or exactly) when Q, P exactly in case Q, and P just in case Q. Many authors regard "iff" as unsuitable in formal writing; others use it freely.[citation needed]
In logic formulae, logical symbols are used instead of these phrases; see the discussion of notation.

Contents

[hide]

[edit] Definition

The truth table of p ↔ q is as follows:[1]
Iff
p q
pq
T T T
T F F
F T F
F F T
Note that it is equivalent to that produced by the XNOR gate, and opposite to that produced by the XOR gate.

[edit] Usage

[edit] Notation

The corresponding logical symbols are "↔", "⇔" and "≡", and sometimes "iff". These are usually treated as equivalent. However, some texts of mathematical logic (particularly those on first-order logic, rather than propositional logic) make a distinction between these, in which the first, ↔, is used as a symbol in logic formulas, while ⇔ is used in reasoning about those logic formulas (e.g., in metalogic). In Łukasiewicz's notation, it is the prefix symbol 'E'.
Another term for this logical connective is exclusive nor.

[edit] Proofs

In most logical systems, one proves a statement of the form "P iff Q" by proving "if P, then Q" and "if Q, then P" (or the inverse of "if P, then Q", i.e. "if not Q, then not P"). Proving this pair of statements sometimes leads to a more natural proof, since there are not obvious conditions in which one would infer a biconditional directly. An alternative is to prove the disjunction "(P and Q) or (not-P and not-Q)", which itself can be inferred directly from either of its disjuncts — that is, because "iff" is truth-functional, "P iff Q" follows if P and Q have both been shown true, or both false.

[edit] Origin of iff

Usage of the abbreviation "iff" first appeared in print in John L. Kelley's 1955 book General Topology.[2] Its invention is often credited to Paul Halmos, who wrote "I invented 'iff,' for 'if and only if'—but I could never believe I was really its first inventor."[3]

[edit] Distinction from "if" and "only if"

"If the pudding is a custard, then Madison will eat it." or "Madison will eat the pudding if it is a custard." (equivalent to "Only if Madison will eat the pudding, is it a custard.")

If and only if

From Wikipedia, the free encyclopedia
Jump to: navigation, search
↔ ⇔ ≡
Logical symbols
representing iff.
In logic and related fields such as mathematics and philosophy, if and only if (shortened iff) is a biconditional logical connective between statements.
In that it is biconditional, the connective can be likened to the standard material conditional ("only if," equal to "if ... then") combined with its reverse ("if"); hence the name. The result is that the truth of either one of the connected statements requires the truth of the other, i.e., either both statements are true, or both are false. It is controversial whether the connective thus defined is properly rendered by the English "if and only if", with its pre-existing meaning. Of course, there is nothing to stop us stipulating that we may read this connective as "only if and if", although this may lead to confusion.
In writing, phrases commonly used, with debatable propriety, as alternatives to "if and only if" include Q is necessary and sufficient for P, P is equivalent (or materially equivalent) to Q (compare material implication), P precisely if Q, P precisely (or exactly) when Q, P exactly in case Q, and P just in case Q. Many authors regard "iff" as unsuitable in formal writing; others use it freely.[citation needed]
In logic formulae, logical symbols are used instead of these phrases; see the discussion of notation.

Contents

[hide]

[edit] Definition

The truth table of p ↔ q is as follows:[1]
Iff
p q
pq
T T T
T F F
F T F
F F T
Note that it is equivalent to that produced by the XNOR gate, and opposite to that produced by the XOR gate.

[edit] Usage

[edit] Notation

The corresponding logical symbols are "↔", "⇔" and "≡", and sometimes "iff". These are usually treated as equivalent. However, some texts of mathematical logic (particularly those on first-order logic, rather than propositional logic) make a distinction between these, in which the first, ↔, is used as a symbol in logic formulas, while ⇔ is used in reasoning about those logic formulas (e.g., in metalogic). In Łukasiewicz's notation, it is the prefix symbol 'E'.
Another term for this logical connective is exclusive nor.

[edit] Proofs

In most logical systems, one proves a statement of the form "P iff Q" by proving "if P, then Q" and "if Q, then P" (or the inverse of "if P, then Q", i.e. "if not Q, then not P"). Proving this pair of statements sometimes leads to a more natural proof, since there are not obvious conditions in which one would infer a biconditional directly. An alternative is to prove the disjunction "(P and Q) or (not-P and not-Q)", which itself can be inferred directly from either of its disjuncts — that is, because "iff" is truth-functional, "P iff Q" follows if P and Q have both been shown true, or both false.

[edit] Origin of iff

Usage of the abbreviation "iff" first appeared in print in John L. Kelley's 1955 book General Topology.[2] Its invention is often credited to Paul Halmos, who wrote "I invented 'iff,' for 'if and only if'—but I could never believe I was really its first inventor."[3]

[edit] Distinction from "if" and "only if"

"If the pudding is a custard, then Madison will eat it." or "Madison will eat the pudding if it is a custard." (equivalent to "Only if Madison will eat the pudding, is it a custard.")

If and only if

From Wikipedia, the free encyclopedia
Jump to: navigation, search
↔ ⇔ ≡
Logical symbols
representing iff.
In logic and related fields such as mathematics and philosophy, if and only if (shortened iff) is a biconditional logical connective between statements.
In that it is biconditional, the connective can be likened to the standard material conditional ("only if," equal to "if ... then") combined with its reverse ("if"); hence the name. The result is that the truth of either one of the connected statements requires the truth of the other, i.e., either both statements are true, or both are false. It is controversial whether the connective thus defined is properly rendered by the English "if and only if", with its pre-existing meaning. Of course, there is nothing to stop us stipulating that we may read this connective as "only if and if", although this may lead to confusion.
In writing, phrases commonly used, with debatable propriety, as alternatives to "if and only if" include Q is necessary and sufficient for P, P is equivalent (or materially equivalent) to Q (compare material implication), P precisely if Q, P precisely (or exactly) when Q, P exactly in case Q, and P just in case Q. Many authors regard "iff" as unsuitable in formal writing; others use it freely.[citation needed]
In logic formulae, logical symbols are used instead of these phrases; see the discussion of notation.

Contents

[hide]

[edit] Definition

The truth table of p ↔ q is as follows:[1]
Iff
p q
pq
T T T
T F F
F T F
F F T
Note that it is equivalent to that produced by the XNOR gate, and opposite to that produced by the XOR gate.

[edit] Usage

[edit] Notation

The corresponding logical symbols are "↔", "⇔" and "≡", and sometimes "iff". These are usually treated as equivalent. However, some texts of mathematical logic (particularly those on first-order logic, rather than propositional logic) make a distinction between these, in which the first, ↔, is used as a symbol in logic formulas, while ⇔ is used in reasoning about those logic formulas (e.g., in metalogic). In Łukasiewicz's notation, it is the prefix symbol 'E'.
Another term for this logical connective is exclusive nor.

[edit] Proofs

In most logical systems, one proves a statement of the form "P iff Q" by proving "if P, then Q" and "if Q, then P" (or the inverse of "if P, then Q", i.e. "if not Q, then not P"). Proving this pair of statements sometimes leads to a more natural proof, since there are not obvious conditions in which one would infer a biconditional directly. An alternative is to prove the disjunction "(P and Q) or (not-P and not-Q)", which itself can be inferred directly from either of its disjuncts — that is, because "iff" is truth-functional, "P iff Q" follows if P and Q have both been shown true, or both false.

[edit] Origin of iff

Usage of the abbreviation "iff" first appeared in print in John L. Kelley's 1955 book General Topology.[2] Its invention is often credited to Paul Halmos, who wrote "I invented 'iff,' for 'if and only if'—but I could never believe I was really its first inventor."[3]

[edit] Distinction from "if" and "only if"

"If the pudding is a custard, then Madison will eat it." or "Madison will eat the pudding if it is a custard." (equivalent to "Only if Madison will eat the pudding, is it a custard.")

If and only if

From Wikipedia, the free encyclopedia
Jump to: navigation, search
↔ ⇔ ≡
Logical symbols
representing iff.
In logic and related fields such as mathematics and philosophy, if and only if (shortened iff) is a biconditional logical connective between statements.
In that it is biconditional, the connective can be likened to the standard material conditional ("only if," equal to "if ... then") combined with its reverse ("if"); hence the name. The result is that the truth of either one of the connected statements requires the truth of the other, i.e., either both statements are true, or both are false. It is controversial whether the connective thus defined is properly rendered by the English "if and only if", with its pre-existing meaning. Of course, there is nothing to stop us stipulating that we may read this connective as "only if and if", although this may lead to confusion.
In writing, phrases commonly used, with debatable propriety, as alternatives to "if and only if" include Q is necessary and sufficient for P, P is equivalent (or materially equivalent) to Q (compare material implication), P precisely if Q, P precisely (or exactly) when Q, P exactly in case Q, and P just in case Q. Many authors regard "iff" as unsuitable in formal writing; others use it freely.[citation needed]
In logic formulae, logical symbols are used instead of these phrases; see the discussion of notation.

Contents

[hide]

[edit] Definition

The truth table of p ↔ q is as follows:[1]
Iff
p q
pq
T T T
T F F
F T F
F F T
Note that it is equivalent to that produced by the XNOR gate, and opposite to that produced by the XOR gate.

[edit] Usage

[edit] Notation

The corresponding logical symbols are "↔", "⇔" and "≡", and sometimes "iff". These are usually treated as equivalent. However, some texts of mathematical logic (particularly those on first-order logic, rather than propositional logic) make a distinction between these, in which the first, ↔, is used as a symbol in logic formulas, while ⇔ is used in reasoning about those logic formulas (e.g., in metalogic). In Łukasiewicz's notation, it is the prefix symbol 'E'.
Another term for this logical connective is exclusive nor.

[edit] Proofs

In most logical systems, one proves a statement of the form "P iff Q" by proving "if P, then Q" and "if Q, then P" (or the inverse of "if P, then Q", i.e. "if not Q, then not P"). Proving this pair of statements sometimes leads to a more natural proof, since there are not obvious conditions in which one would infer a biconditional directly. An alternative is to prove the disjunction "(P and Q) or (not-P and not-Q)", which itself can be inferred directly from either of its disjuncts — that is, because "iff" is truth-functional, "P iff Q" follows if P and Q have both been shown true, or both false.

[edit] Origin of iff

Usage of the abbreviation "iff" first appeared in print in John L. Kelley's 1955 book General Topology.[2] Its invention is often credited to Paul Halmos, who wrote "I invented 'iff,' for 'if and only if'—but I could never believe I was really its first inventor."[3]

[edit] Distinction from "if" and "only if"

"If the pudding is a custard, then Madison will eat it." or "Madison will eat the pudding if it is a custard." (equivalent to "Only if Madison will eat the pudding, is it a custard.")