Portal Informatika | Sharing Tugas | Sharing Aplikasi | Sharing Informasi tentang Teknologi dan Aplikasi

  • Portal Informatika

    Portal Informatika adalah Portal khusus untuk sharing informasi mengenai dunia Teknologi dan Informasi

  • Sharing Ilmu tentang C++

    Bahasa C adalah bahasa dasar pemograman. Di blog ini kita akan sharing ilmu mengenai bahasa pemograman C++. Kebanyakan yang ditampilkan di blog ini adalah listing program aplikasi yang telah diujicobakan oleh penulis. Selamat membaca!!

  • Script and Coding

    Script dan Coding adalah kata yang tidak asing bagi seorang programmer. Mari kita sharing ilmu :)

  • #

    #

Kamis, 18 Oktober 2012

APLIKASI RUMUS MATEMATIKA DENGAN M.VISUAL C++ 6.0

Posted by Unknown On 06.45 No comments


// matematika dengan menu.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <iostream.h>

int main()
{
     float pilih, menuutama, s, vkubus, r, llingkaran, t, vtabung;
     float phi = 3.14;
     char status;

     menu :
     cout << "\n\n\t\t - Rumus Matematika Bangun Datar dan Bangun Ruang - \n";
     cout << "\t===================================================================== \n\n";

     cout << "Menu : \n";
     cout << "1. Volume Kubus \n";
     cout << "2. Luas Lingkaran \n";
     cout << "3. Volume Tabung \n";
     cout << "Rumus yang anda pilih adalah menu nomor : ";
     cin >> pilih;

     if (pilih==1)
     {
           kubus :
           cout << "\n\n\t\t - Volume Kubus - \n";
           cout << "\t================================== \n\n";
   
           cout << "Masukan panjang sisi kubus : ";
           cin >> s;
   
           cout << "\n";
           vkubus = s*s*s;
           cout << "Rumus : V = S * S * S \n";
           cout << "V = " << s << " * " << s << " * " << s << "\n";
           cout << "V = " << vkubus;
           cout << "\n\n";

           cout << "Apakah anda ingin memilih kembali ? (y=ya t=tidak m=menu utama) : ";
           cin >> status;

           if(status =='y' || status =='Y')
                     goto kubus;
           else if (status == 'm' || status == 'M')
                     goto menu;
           else
                     goto end ;

     }
     else if (pilih==2)
     {
           lingkaran :
           cout << "\n\n\t\t - Luas Lingkaran - \n";
           cout << "\t==================================== \n\n";
   
           cout << "Masukan jari-jari lingkaran : ";
           cin >> r;
   
           cout << "\n";
           llingkaran = phi*r*r;
           cout << "Rumus : L = phi * r * r \n";
           cout << "L = 3.14 * " << r << " * " << r << "\n";
           cout << "L = " << llingkaran;
           cout << "\n\n";

           cout << "Apakah anda ingin memilih kembali ? (y=ya t=tidak m=menu utama) : ";
           cin >> status;

           if(status =='y' || status =='Y')
                     goto lingkaran;
           else if (status == 'm' || status == 'M')
                     goto menu;
           else
                     goto end ;
     }
     else if (pilih==3)
     {
           tabung :
           cout << "\n\n\t\t - Volume Tabung - \n";
           cout << "\t==================================== \n\n";
   
           cout << "Masukan jari-jari alas tabung : ";
           cin >> r;

           cout << "Masukan tinggi tabung : ";
           cin >> t;
   
           cout << "\n";
           vtabung = phi*r*r*t;
           cout << "Rumus : V = phi * r * r *t \n";
           cout << "V = 3.14 * " << r << " * " << r << " * " << t << "\n";
           cout << "V = " << vtabung;
           cout << "\n\n";

           cout << "Apakah anda ingin memilih kembali ? (y=ya t=tidak m=menu utama) : ";
           cin >> status;

           if(status =='y' || status =='Y')
                     goto tabung;
           else if (status == 'm' || status == 'M')
                     goto menu;
           else
                     goto end ;
     }
     end :
   
     cout << "\t\t\t by : Ilham Permana \n";
     cout << "\t\t\t Politekni TEDC Bandung\n";
     cout << "\n\t========================= Terima Kasih =========================\n\n\n" ;
                return 0;
}


TAMPILAN APLIKASI


Rabu, 17 Oktober 2012

MEMBUAT TAMPILAN USERNAME & PASSWORD DENGAN VISUAL BASIC 2008

Posted by Unknown On 10.39 No comments


Public Class Form1

   
    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        TextBox1.Text = ""
        TextBox2.Text = ""

    End Sub

    Private Sub ButtonLogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonLogin.Click
        Dim admin As String
        Dim pass As String

        admin = TextBox1.Text
        pass = TextBox2.Text

        If admin = "admin1" And pass = "12345" Then
            Form2.Show()
        Else
            MessageBox.Show("Password Salah!")

        End If
    End Sub
End Class

TAMPILAN APLIKASI


CONTOH APLIKASI SEDERHANA DISKON BELANJA DENGAN M.VISUAL C++ 6.0

Posted by Unknown On 09.46 No comments


// program diskon belanja.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <iostream.h>

int main(int argc, char* argv[])
{
int belanja, diskon, jumlah ;

cout << "======KASIR=======" << "\n\n" ;


cout << " Total Pembelanjaan Rp. " ;
cin >> belanja ;

if (belanja >= 200000)
{
diskon = belanja/10 ;
jumlah = belanja - diskon ;

cout << "\n\n" ;
cout << "Diskon yang anda dapatkan adalah Rp. " << diskon << "\n" ;
cout << "Total yang harus Anda bayar adalah Rp. " << jumlah << "\n";
}

else
{
cout << "\n\n" ;
cout << " Anda tidak dapat diskon!! " << "\n\n" ;
cout << " Jumlah yang harus dibayar adalah Rp. " << belanja << "\n" ;
}
return 0;
}


TAMPILAN APLIKASI


MENAMPILKAN ANGKA KELIPATAN 10 DENGAN M.VISUAL C++ 6.0

Posted by Unknown On 09.29 No comments


// prog3.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <iostream.h>
#define SIZE 30


int main(int argc, char* argv[])
{
int i;
int array [SIZE];

for (i=0; i<SIZE; i++)
{
array [i]=i*10;
cout << "\n" << array [i] ;

}

return 0;
}


TAMPILAN APLIKASI


APLIKASI SEDERHANA MEMBUAT OPERASI MATEMATIKA DENGAN M.VISUAL C++ 6.0

Posted by Unknown On 09.23 No comments


// operasi 1 operator.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <iostream.h>

int main(int argc, char* argv[])
{
cout << "===========OPERASI BILANGAN===========" << "\n\n" ;

int bil1, bil2, hasil ;
char op;

cout << "\n" ;
cout << " Masukan bilangan pertama : " ;
cin >> bil1 ;

cout << "\n" ;
cout << " Masukan bilangan kedua : " ;
cin >> bil2 ;

cout << "\n" ;
cout << " Masukan operator ( + , - , / , * , %) : " ;
cin >> op ;

if (op=='+')
{
cout << "\n\n" ;
hasil = bil1 + bil2 ;
cout << "Proses " << bil1 << "+" << bil2  << "\n\n";
}
else if (op=='-')
{
cout << "\n\n" ;
hasil = bil1 - bil2 ;
cout << "Proses " << bil1 << "-" << bil2  << "\n\n";
}
else if (op=='/')
{
cout << "\n\n" ;
hasil = bil1 / bil2 ;
cout << "Proses " << bil1 << "/" << bil2  << "\n\n";
}
else if (op=='*')
{
cout << "\n\n" ;
hasil = bil1 * bil2 ;
cout << "Proses " << bil1 << "*" << bil2  << "\n\n";
}
else if (op=='%')
{
cout << "\n\n" ;
hasil = bil1 % bil2 ;
cout << "Proses " << bil1 << "%" << bil2  << "\n\n";
}
cout << "\n\n" ;
cout << "Hasilnya adalah  " << hasil << "\n\n" ;
return 0;
}


TAMPILAN APLIKASI


APLIKASI SANGAT SEDERHANA: MENENTUKAN BILANGAN GANJIL DAN GENAP MENGGUNAKAN M.VISUAL C++ 6.0

Posted by Unknown On 09.15 No comments




// bilangan genap dan ganjil.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <iostream.h>

int main(int argc, char* argv[])
{
int bil ;

cout << "Masukan bilangan : " ;
cin >> bil ;

if (bil%2==0)
cout << "Bilangan Genap : " ;
else
cout << "Bilangan Ganjil : " << "\n\n" ;

return 0;
}

TAMPILAN APLIKASI



APLIKASI UNTUK MENGURUTKAN TAHUN 1990 - TAHUN 2020 dan MENAMPILKAN TAHUN KABISAT DENGAN MENGGUNAKAN VISUAL C++ 6.0

Posted by Unknown On 08.09 No comments



LISTING PROGRAM

 
#include "stdafx.h"
#include <iostream.h>

int main()
{
    int i, a = 1990, b = 2020;
   
    cout << "\n\n\t\t Urutan Tahun dari Tahun 1990-2020\n";
    cout << "\t =================================================\n\n";

    for (i=a; i<=b; i++)
    {
        if(i%4==0)
            cout << "\t\t Tahun " << i << " || Tahun Kabisat \n";
        else
            cout << "\t\t Tahun " << i << " || Bukan Tahun Kabisat \n";
    }

    cout << "\n";
    cout << "\n\n\t\tTerima Kasih Telah Menggunakan Program Rumus ini\n";
    cout << "\t\t\t by : Fahmi Maulani Fauziah \n";
    cout << "\t\t\t Politekni TEDC Bandung\n";
    cout << "\n\t===================== Sampai Jumpa ==========================\n\n\n" ;
    return 0;
}

Selasa, 16 Oktober 2012

MENGHITUNG NILAI IPK MENGGUNAKAN VB.2008

Posted by Unknown On 20.25 No comments


Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click


        lblipkakhir.Text = ((Val(TextBox1.Text) + Val(TextBox2.Text) + Val(TextBox3.Text) + Val(TextBox4.Text) + Val(TextBox5.Text) + Val(TextBox6.Text) + Val(TextBox7.Text) + Val(TextBox8.Text)) / 8)

        Dim ipk As Double
        ipk = lblipkakhir.Text
        If ipk >= 3.51 Then
            lblpredikat.Text = "Cumlaude"
        ElseIf ipk > 3 And ipk <= 3.5 Then
            lblpredikat.Text = "Sangat Memuaskan"
        ElseIf ipk > 2.5 And ipk <= 3 Then
            lblpredikat.Text = "Memuaskan"
        ElseIf ipk <= 2.49 Then
            lblpredikat.Text = "Kuliah lagi kamu!!"

        End If
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

        TextBox1.Text = ""
        TextBox2.Text = ""
        TextBox3.Text = ""
        TextBox4.Text = ""
        TextBox5.Text = ""
        TextBox6.Text = ""
        TextBox7.Text = ""
        TextBox8.Text = ""
        lblipkakhir.Text = ""
        lblpredikat.Text = ""

    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        End
    End Sub
End Class




APLIKASI BIODATA SEDERHANA MENGGUNAKAN VB 2008

Posted by Unknown On 19.32 1 comment


      I.        LISTING PROGRAM

Public Class Form1

        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        ComboBoxtgl.Text = "Tgl"
        ComboBoxbln.Text = "Bulan"
        ComboBoxthn.Text = "Tahun"
        ComboBoxAgama.Text = "Agama"
    End Sub

    Private Sub ButtonUlangi_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonUlangi.Click
        'Tombol Ulangi

        TextBoxDepan.Text = ""
        TextBoxBelakang.Text = ""
        TextBoxTempat.Text = ""
        TextBoxAlamat.Text = ""
        TextBoxLain.Text = ""
        ComboBoxtgl.Text = ""
        ComboBoxbln.Text = ""
        ComboBoxthn.Text = ""
        ComboBoxAgama.Text = ""
        RadioButton1.Checked = False
        RadioButton2.Checked = False
        CheckBoxBasic.Checked = False
        CheckBoxC.Checked = False
        CheckBoxCplus.Checked = False
        CheckBoxPhp.Checked = False
        CheckBoxJava.Checked = False
        CheckBoxLain.Checked = False

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        'Nama Lengkap
        LabelNama.Text = TextBoxDepan.Text
        LabelBelakang.Text = TextBoxBelakang.Text

        'Tempat Tanggal Lahir
        LabelTtl.Text = TextBoxTempat.Text & "," & ComboBoxtgl.Text & " " & ComboBoxbln.Text & " " & ComboBoxthn.Text

        'Agama
        LabelAgama.Text = ComboBoxAgama.Text

        'Jenis Kelamin
        If RadioButton1.Checked Then
            LabelJK.Text = "Laki-laki"
        ElseIf RadioButton2.Checked Then
            LabelJK.Text = "Perempuan"

        End If

        'Alamat
        LabelAlamat.Text = TextBoxAlamat.Text

        'Pilihan Bahasa Program

        If CheckBoxBasic.Checked Then
            ListBox1.Items.Add("Basic")
        End If

        If CheckBoxC.Checked Then
            ListBox1.Items.Add("C")
        End If

        If CheckBoxCplus.Checked Then
            ListBox1.Items.Add("C++")
        End If

        If CheckBoxPHP.Checked Then
            ListBox1.Items.Add("PHP")
        End If

        If CheckBoxJava.Checked Then
            ListBox1.Items.Add("Java")
        End If

        If CheckBoxLain.Checked Then
            ListBox1.Items.Add = TextBoxLain.Text
        End If
    End Sub

    Private Sub ComboBoxtgl_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBoxtgl.SelectedIndexChanged

    End Sub

    Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged

    End Sub
End Class



    II.        TAMPILAN APLIKASI


APLIKASI SEGITIGA SIKU SIKU

Posted by Unknown On 19.14 No comments


      I.        LISTING PROGRAM


Public Class Form1


    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        imports System.Math

        'Deklarasi
       
        Dim hitung As Double

        'Rumus Segitiga Siku-Siku
        hitung = Sqrt((Val(TextBox1.Text) ^ 2) + (Val(TextBox2.Text) ^ 2))
       
        Label6.Text = hitung & " cm - Sisi Miring Segitiga"

    End Sub
                        End Class

    II.        PROPERTIES

Nama Objek
Properties
Nilai
Form1
Text
SEGITIGA SIKU SIKU

MaximizeBox
False
TextBox1
Name
TextBox1

TextAlign
Right
TextBox2
Name
TextBox2

TextAlign
Right
Button
Text
&Hitung

Name
Button1
Label1
Text
SEGITIGA SIKU SIKU
Label2
Text
Nilai Alas
Label3
Text
Nilai Tinggi
Label4
Text
Cm
Label5
Text
cm
Label6
Text
Nilai Sisi Miring

Name
Label6

FontBold
True


   III.        TAMPILAN


KONVERSI SUHU CELCIUS KE REAMUR & FAHRENHEIT

Posted by Unknown On 19.12 1 comment


      I.        LISTING PROGRAM

Public Class Form1

        Private Sub cmdKonversi_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdKonversi.Click
        'Deklarasi
        Dim reamur As Double
        Dim fahrenheit As Double

        'Rumus Konversi
        reamur = Val(txtcelcius.Text) * 0.8
        fahrenheit = Val(txtcelcius.Text) * 1.8 + 32

        lblreamur.Text = reamur & " Reamur"
        lblfahrenheit.Text = fahrenheit & " Fahrenheit"
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        End
    End Sub
End Class




      I.        PROPERTIS

Nama Objek
Properties
Nilai
Form1
Text
Koonversi Suhu

MaximizeBox
False
TextBox
Name
txtCelcius

TextAlign
Right
Button
Text
&Konversi

Name
cmdKonversi
Label1
Text
Celcius
Label2
Text
Fahrenheit

Name
lblfahrenheit

FontBold
True
Label3
Text
Reamur

Name
lblreamur

FontBold
True



TAMPILAN APLIKASI