Web People Of HTML Comunity

Introduced By : CRYSTIAN AUGUST VALENCIA
S!L@HK@N KL!K L!NK2 D!B@W@H !N! :
{ BLOG HTML 1 } { Pengertian HMTL } { belum di isi } { Belum di isi } { Biodata Anggota }
{ Belun di isi} { belum di isi} { belum di isi} { belum di isi} { belum di isi} { belum di isi}

Sabtu, 2 Mac 2013

kode program borland untuk memberi warna pada tulisan

#include <iostream.h>
#include <conio.h>
#include <stdio.h>#define tampil cprintf
#define warna textcolor

char n[50],mt[50];
int m;
float t1,t2,t3,q,ut,ua,a,total=0,rata2;
float f_ip(void);

//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
main()
{
warna(10);
tampil("\nMenghitung IPK\n\n");
cout<<endl;
warna(13);
tampil("+================================+");
cout<<endl;
warna(11);
tampil("\nCopyright by");
cout<<endl;
warna(14);
tampil("\nDiedyk");
cout<<endl;
warna(14);
tampil("\nSuntoro");
cout<<endl;
warna(14);
tampil("\nAtmojo");
cout<<endl;
warna(13);
tampil("\n+================================+");
getch();

cout<<"\n\nNama\t\t:";
gets(n);
cout<<"NIM\t\t:";
cin>>m;
cout<<"Mata Kuliah\t:";
cin>>mt;
cout<<"Tugas 1\t\t:";
cin>>t1;
cout<<"Tugas 2\t\t:";
cin>>t2;
total=t1+t2+t3;
rata2=total/3;
cout<<"Tugas 3\t\t:";
cin>>t3;
cout<<"Quiz\t\t:";
cin>>q;
cout<<"UTS\t\t:";
cin>>ut;
cout<<"UAS\t\t:";
cin>>ua;
clrscr();
warna(13);
tampil("\n-----------------------------------------------------------------------\n");
cout<<endl;
a=f_ip();
cout<<"\n\tNama\t\t: "<<n;
cout<<"\n\tNIM\t\t: "<<m;
cout<<"\n\tMata Kuliah\t: " <<mt;
cout<<"\n\tIP\t\t:";
if (a>91) cout << " A";
else if (a>81) cout << " B+";
else if (a>71) cout << " B";
else if (a>61) cout << " C+";
else if (a>51) cout << " C";
else if (a>31) cout << " D";
else cout << " E";

cout<<"\n\tKeterangan\t: "<<n<<" ";
if (a>91) cout <<"(Lulus)";
else if (a>81) cout <<"(Lulus)";
else if (a>71) cout <<"(Lulus)";
else if (a>61) cout <<"(Lulus)";
else if (a>51) cout <<"(Lulus)";
else if (a>31) cout <<"(Lulus)";
else cout <<"(Tidak Lulus)";
cout<<endl;
warna(13);
tampil("\n-----------------------------------------------------------------------\n");
getch();

}
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

//************************************************
float f_ip()
{
float total=0;
total=total+(rata2*0.2);
total=total+(q*0.2);
total=total+(ut*0.25);
total=total+(ua*0.35);
return total;
}
//************************************************

Selasa, 18 Disember 2012

Persegi Luas Segitiga Keliling

#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#include <iostream.h>

void main()
{
     char ulangi;
     clrscr;
     int sisi,r,panjang,lebar,alas,tinggi;
     int luas, keliling;

    do
    {

cout<<"SILAHKAN PILIH PROGRAM YANG INGIN DI JALANKAN...!";
cout<<"\n";
cout<<"\n 1. MENGHITUNG LUAS DAN KELILING PERSEGI";
cout<<"\n 2. MENGHITUNG LUAS DAN KELILING LINGKARAN";
cout<<"\n 3. MENGHITUNG LUAS DAN KELILING PERSEGI PANJANG";
cout<<"\n 4. MENGHITUNG LUAS SEGITIGA";
cout<<"\n";
int    pilihan;
cout<<"\nMASUKKAN PILIHAN PROGRAM YANG INGIN ANDA JALANKAN :";
cin>>pilihan;
if(pilihan<2)
{
    cout<<"\n1. MENGHITUNG LUAS DAN KELILING PERSEGI";
        cout<<"\n   MASUKAN PANJANG SISI\t\t:";
        cin>>sisi;

        luas = sisi * sisi;
        keliling= 4*sisi;
        cout<<"   MAKA LUASNYA ADALAH\t\t:"<<luas;
        cout<<"\n   MAKA KELILINGNYA ADALAH\t:"<<keliling;
}
else
if(pilihan<=2)
{
    cout<<"\n2. MENGHITUNG LUAS DAN KELILING LINGKARAN";
        cout<<"\n   MASUKAN PILIHAN JARI-JARINYA\t\t\t:";
        cin>>r;

        luas             = 3,14*r*r;
        keliling        = 2*3,14*r;
        cout<<"   MAKA LUAS LINGKARANNYA ADALAH\t\t:"<<luas;
        cout<<"\n   MAKA KELILING LINGKARANNYA ADALAH\t\t:"<<keliling;
}
else
if (pilihan<=3)
{
    cout<<"\n3. MENGHITUNG LUAS DAN KELILING PERSEGI PANJANG";
        cout<<"\n   MASUKAN PILIHAN PANJANGNYA\t:";
        cin>>panjang;
        cout<<"   MASUKAN PILIHAN LEBARNYA\t:";
        cin>>lebar;

        luas = panjang * lebar;
        keliling=2*panjang+2*lebar;
        cout<<"   MAKA LUASNYA ADALAH\t\t:"<<luas;
        cout<<"\n   MAKA KELILINGNYA ADALAH\t:"<<keliling;
}
else
if(pilihan<=4)
{
    cout<<"\n4. MENGHITUNG LUAS SEGITIGA";
        cout<<"\n   MASUKAN PILIHAN ALASNYA\t:";
        cin>>alas;
        cout<<"   MASUKAN PILIHAN TINGGINYA\t:";
        cin>>tinggi;

        luas = (alas * tinggi)/2;
        cout<<"   MAKA LUASNYA ADALAH\t\t:"<<luas;
}
else
cout<<"\nPILIHAN YANG ANDA MASUKKAN SALAH...!";
    getch();
    cout<<"\n";
    cout<<"\nAPAHKAH ANDA INGIN MENGULANG...[Y/N] :";
    cin>>ulangi;
    cout<<"\n";
    }
    while (ulangi=='y'||ulangi=='Y');
    getche ();
}