Selasa, 25 Maret 2014



<html>
<head>
<title>CURRICULUM VITAE GHOFARI</title>
</head>

<body>

<h1>Curriculum Vitae</h1>
<body bgcolor=red>
<h2>DATA PRIBADI</h2>
<form action="#" method="get">
<table width="579" height="294" border="1">
  <tr>
    <td width="185">Nama</td>
    <td width="23">:</td>
    <td width="349"><input type=text name=Nama width="380"/></td>
  </tr>
  <tr>
    <td width="185">Tempat / Tanggal Lahir</td>
    <td>:</td>
    <td width="349"><input type=text name=tempat /><select name=tempat>
        <option value=1>01
        <option value=2>02
        <option value=3>03
        <option value=4>04
        <option value=5>05
        <option value=6>06
        <option value=7>07
        <option value=8>08
        <option value=9>09
        <option value=10>10
        <option value=11>11
        <option value=12>12
        <option value=13>13
        <option value=14>14
        <option value=15>15
        <option value=16>16
        <option value=17>17
        <option value=18>18
        <option value=19>19
        <option value=20>20
        <option value=21>21
        <option value=22>22
        <option value=23>23
        <option value=24>24
        <option value=25>25
        <option value=26>26
        <option value=27>27
        <option value=28>28
        <option value=29>29
        <option value=30>30
        <option value=31>31
        </select>
        <select name=bln>
            <option value=1>01
            <option value=1>02
            <option value=3>03
            <option value=4>04
            <option value=5>05
              <option value=6>06
              <option value=7>07
              <option value=8>08
              <option value=9>09
              <option value=10>10
              <option value=11>11
              <option value=12>12
        </select>
        <select name=tahun>
            <option value=1985>1985    
            <option value=1986>1986
            <option value=1987>1987
            <option value=1988>1988
            <option value=1989>1989
            <option value=1990>1990
            <option value=1991>1991
            <option value=1992>1992
            <option value=1993>1993
            <option value=1994>1994
            <option value=1995>1995
                <option value=1996>1996
                <option value=1997>1997
               <option value=1998>1998
              <option value=1999>1999
               <option value=2000>2000
    </select></td>
  </tr>
  <tr>
    <td width="185">Jenis Kelamin </td>
    <td>:</td>
    <td width="349"><input type=radio name=gender value=pria>Laki-laki
    <input type=radio name=gender value=Wanita>Perempuan</td>
  </tr>
  <tr>
    <td width="185">Agama</td>
    <td>:</td>
    <td width="349"><input type=radio name=agama value=Islam>Islam
    <input type=radio name=agama value=Katholik>Katholik
    <input type=radio name=gender value=Kristen>Kristen
    <input type=radio name=agama value=Hindu>Hindu
    <input type=radio name=agama value=Budha>Budha    </td>
  </tr>
  <tr>
    <td width="185">Alamat</td>
    <td>:</td>
    <td width="349"><textarea name=Alamat cols=60 rows=4></textarea></td>
  </tr>
  <tr>
    <td width="185">No.HP</td>
    <td>:</td>
    <td width="349"><input type="text" name="No.HP" width="380"/></td>
  </tr>
  <tr>
    <td width="185">Email</td>
    <td>:</td>
    <td width="349"><input type="text" name="Email" width="380"/></td>
  </tr>
</table>
</body>
</html>



Hasilnya seperti ini




Beberapa elemen dalam membuat form seperti dibawah ini :

a. Text Box <input type=”text” />
Digunakan untuk memasukkan input berupa text.

b. Password<input type=”password” />
Digunakan untuk memasukkan password.

c. Hidden<input type=”hidden” />
Digunakan untuk mengirim data ke suatu aplikasi yang tidak diinginkan untuk dilihat oleh browser.

d. Check Box<input type=”checkbox” />
Check box digunakan untuk dapat memilih lebih dari satu pilihan.
checked = ( checkbox yang sudah ditandai )

e. Radio Button<input type=”radio” />
Radio Button digunakan untuk dapat memilih hanya satu pilihan.
checked = ( checkbox yang sudah ditandai )

f. Push Button<input type=”button” />
Elemen ini biasanya digunakan dengan JavaScript atau VBScript untuk menghasilkan suatu aksi.

g. Submit<input type=”submit” />
Untuk memberikan tombol submit untuk mengirimkan data ke suatu aplikasi yang ditentukan dalam atribut action dalam elemen form.

h. Image Submit Button<input type=”image” src=”url” />
Digunakan untuk menggantikan tombol standar submit dengan image.

i. Reset<input type=”reset” />
Digunakan untuk mereset semua masukan form.

j. Text Area<textarea>…</textarea>
Elemen untuk memasukkan teks secara leluasa seperti notepad.

k. Select<select>…</select>
Daftar isi dalam property select menggunakan tag <option>


Senin, 24 Maret 2014

o   Menggunakan Header file dari fungsi  iostream.h(cout, cin) ; conio.h(getch) ; stdio.h(gets)
#include <iostream.h>
#include <conio.h>
#include <stdio.h>

main(){

char nama[30], nim[10], kelas[10];
float tugas, mid, uas, nilai;

            cout<<"Nama Mahasiswa        : ";gets(nama);
            cout<<"NIM                 : ";cin>>nim;
            cout<<"Kelas               : ";cin>>kelas;
            cout<<"Nilai Tugas      : ";cin>>tugas;
            cout<<"Nilai Mid         : ";cin>>mid;
            cout<<"Nilai Uas         : ";cin>>uas;

            nilai=(tugas+mid+uas)/3;

            cout<<"Rata Nilai        : "<<nilai;

            getch();}
o   Menggunakan Header file dari fungsi iostream.h (cout); conio.h(getch); windows(system)

#include <iostream.h>
#include <conio.h>
#include <windows>

main(){
            system("color 2A");
            cout<<" Pemrograman Terstruktur";
            cout<<"\n--------------------------------------";
            cout<<"\n\tNama          : Ghofari Ahmad Hidayat";
            cout<<"\n\tNIM            : 13.02.8579";
            cout<<"\n\tKelas          : 13 D3 MI 03";
            cout<<"\n--------------------------------------";
            cout<<"\nSTMIK AMIKOM Yogyakarta";

getch();}

o  Menggunakan Header file dari fungsi  stdio.h (printf, scanf); conio.h(getch); windows (system)

#include <stdio.h>
#include <conio.h>
#include <windows>

main(){

            int a,t,luas;

            system("color 2A");
            printf("Masukkan alas             : ");scanf("%i",&a);
            printf("Masukkan tinggi                       : ");scanf("%i",&t);

            luas=0.5*(a*t);

            printf("Luas segitiga                 : %i",luas);

getch();}


o  Menggunakan Header file dari fungsi  iostream.h(cin, cout); stdio.h (gets);conio.h(getch);math.h(pow, sqrt); windows (system)

#include <iostream.h>
#include <stdio.h>
#include <conio.h>
#include <windows>
#include <math.h>

main(){

   char nama[50], nim[15], kelas[10];
   float bil1, bil2, bil3, bilpangkat, bilakar;

   system("color 3C");
   cout<<"Nama Mahasiswa        : ";gets(nama);
   cout<<"\nNIM              : ";cin>>nim;
   cout<<"\nKelas                        : ";cin>>kelas;
   cout<<"\n--------------------------------";
   cout<<"\nMasukkan bilangan yang ingin anda pangkatkan      : ";cin>>bil1;
   cout<<"\nMasukkan bilangan pemangkat                                : ";cin>>bil2;
   cout<<"\nMasukkan bilangan yang ingin anda akarkan           : ";cin>>bil3;

   bilpangkat=pow(bil1,bil2);
   bilakar=sqrt(bil3);

   cout<<"\n"<<bil1<<" dipangkatkan "<<bil2<<"            = "<<bilpangkat;
   cout<<"\n\nAkar dari "<<bil3<<"                     = "<<bilakar;

getch();}


o   Menggunakan Header file dari fungsi  iostream.h(cin, cout); stdio.h (gets);conio.h(getch);math.h(pow, sqrt); iomanip.h; windows (system)

#include <iostream.h>
#include <stdio.h>
#include <conio.h>
#include <windows>
#include <math.h>
#include <iomanip.h>

main(){

     char nama[50], nim[15], kelas[10];
     float bil1, bil2, bil3, bilpangkat, bilakar;

     system("color 3C");
     cout<<"Nama Mahasiswa        : ";gets(nama);
     cout<<"\nNIM              : ";cin>>nim;
     cout<<"\nKelas                        : ";cin>>kelas;
     cout<<"\n--------------------------------";
     cout<<"\nMasukkan bilangan yang ingin anda pangkatkan      : ";cin>>bil1;
     cout<<"\nMasukkan bilangan pemangkat                                : ";cin>>bil2;
     cout<<"\nMasukkan bilangan yang ingin anda akarkan           : ";cin>>bil3;

     bilpangkat=pow(bil1,bil2);
     bilakar=sqrt(bil3);

     cout<<"\n"<<bil1<<" dipangkatkan "<<bil2<<"            = "<<bilpangkat;
     cout<<"\n\nAkar dari "<<bil3<<"                     = "<<bilakar
<<setiosflags(ios::fixed)<<setprecision(5);

getch();}


o   Menggunakan Header file dari fungsi  stdio.h (printf);conio.h(getch);string (strcpy)

#include <stdio.h>
#include <conio.h>
#include <string.h>

main(){

     char string[31];
     char *str1 = "GHOFARI KEREN SEKALI";
     char str2[31];

     strcpy(string, str1);
     printf("Isi String : %s\n", string);
     strncpy(str2,str1,13);
     str2[13]='\0';
     printf("Isi Str2 : %s",str2);
     getch();
     return 0;
}


o   Menggunakan Header file dari fungsi  stdio.h (printf);conio.h(getch);string (strrev)
#include <stdio.h>
#include <conio.h>
#include <string.h>

main(){
     char str1[80]="Bullet For My Valentine";
     clrscr();
     printf("Normal  : %s\n",str1);
     strrev(str1);
     printf("Reverse : %s\n",str1);
     getch();
     return 0;
}
o   Menggunakan Header file dari fungsi  stdio.h (printf);conio.h(getch);string (strupr, strlwr)
#include <stdio.h>
#include <conio.h>
#include <string.h>

main(){

            char str1[80]="Bullet For My Valentine";
            clrscr();
            printf("Normal    : %s\n",str1);
            strupr(str1);
            printf("UpperCase : %s\n",str1);
            strlwr(str1);
            printf("LowerCase : %s\n",str1);
            getch();
            return 0;
}


o   Menggunakan Header file dari fungsi  stdio.h (printf);conio.h(getch);danstring (strcpy, strcat, strncat)
#include <stdio.h>
#include <conio.h>
#include <string.h>

main(){
char str1[80];
char str2[35]="Bullet For My ";
char str3[10]="Valentine”;
clrscr();
strcpy(str1,str2);
strcat(str1,str3);
printf("Hasilpenggabungandengan STRCAT  : %s\n",str1);
strcpy(str1,str2);
strncat(str1,str3,4);
printf("Hasilpenggabungandengan STRNCAT : %s\n",str1);
getch();
return 0;
}

o   Menggunakan Header file dari fungsi  stdlib.h (atoi);conio.h(getch); stdio.h(printf);iostream(cout)
#include <stdlib.h>
#include <stdio.h>
#include <iostream.h>
#include <conio.h>

main(){

            char angka1[3];
            int a1;

            cout<<"Masukan Angka1 = ";cin>>angka1;
            a1 = atoi(angka1);
            printf("Angka1 = %s dan a1 = %d",angka1,a1);

getch();}