This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

Minggu, 27 Desember 2015

PROGRAM SEDERHANA (3.1)

TUGAS DDP 3.1

PROGRAM SEDERHANA (3.1)

#include <iostream>
#include <conio.h>
using namespace std;
class p_panjang {
private:
int p,l;
public:
int luas(){
return (p*l);
}
void beri_nilai (int p1, int l1){
p=p1; l=l1;
}
};
main() {
p_panjang a,b;
int w,x,y,z;
system("Color 1B");
cout<<endl;
string sambutan="\t\t\t>>>>>>>>>> SELAMAT DATANG <<<<<<<<<\n\n";
for (int x=0;x<=sambutan.length();x++){
cout<<sambutan[x];
for (double y=0;y<=990000;y++){
 }}
cout<<endl;
cout<<"Mencari Luas a dan b";
cout<<endl<<endl;
cout<<"Panjang a = ";cin>>w;
cout<<endl;
cout<<"Lebar   a = ";cin>>y;
cout<<endl;
cout<<"Panjang b = ";cin>>x;
cout<<endl;
cout<<"Lebar   b = ";cin>>z;
cout<<endl;
a.beri_nilai(w,y);
b.beri_nilai(x,z);
cout<<"Hasil";
cout<<endl;
cout<<"\nLuas a    = "<<a.luas();
cout<<endl;
cout<<"\nLuas b    = "<<b.luas();
getch();
}

PROGRAM SEDERHANA (3)

TUGAS DDP 3

PROGRAM SEDERHANA (3)

#include <iostream>
#include <conio.h>
using namespace std;
class p_panjang {
public:
int p,l;
int luas(){
return (p*l);
}
};
main() {
char redo;
p_panjang a;
cout<<endl;
system("Color 4A");
cout<<endl;
string sambutan="\t\t>>>>>>>>>> SELAMAT DATANG <<<<<<<<<<\n\n";
for (int x=0;x<=sambutan.length();x++){
cout<<sambutan[x];
for (double y=0;y<=1990000;y++){
 }}
do{
cout<<endl<<endl;
cout<<"MENCARI LUAS";
cout<<endl<<endl;
cout<<"Panjang = ";cin>>a.p;
cout<<endl;
cout<<"Lebar   = ";cin>>a.l;
cout<<endl;
cout<<"HASIL";
cout<<endl<<endl;
cout<<"Luas    = "<<a.luas();
cout<<endl<<endl;
cout<<"\n=========================================================================="<<endl;
cout << "Anda Ingin Mengulangnya Kembali?(Y/T)" << endl; cin >> redo;}
while(redo=='y'||redo=='Y');
cout<<endl<<endl;
cout<<"Terimakasih :) ";

cout<<endl<<endl<<endl<<endl;
cout<<"By : ajie kurnia s s ";
cout<<"\n==========================================================================="<<endl;
}

PROGRAM SEDERHANA (2)



TUGAS DDP 2

PROGRAM SEDERHANA (2)

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

using namespace std;

class CRectangle {
int x, y;
public:
void set_values (int,int);
int area (void) {
return (x*y);
}
};
void CRectangle::set_values (int a, int b){
x = a;
y = b;
}
int main () {
CRectangle rect1, rect2;
int w,x,y,z;
system("Color 4A");
cout<<endl;
string sambutan="\t\t SELAMAT DATANG      \n\n";
for (int x=0;x<=sambutan.length();x++){
cout<<sambutan[x];
for (double y=0;y<=990000;y++){
 }
 }
cout<<endl<<endl;
cout<<"MENCARI LUAS AREA 1 dan 2";
cout<<endl<<endl;
cout<<"Panjang area 1 = ";cin>>w;
cout<<endl;
cout<<"Luas area    1 = ";cin>>y;
cout<<endl;
cout<<"Panjang area 2 = ";cin>>x;
cout<<endl;
cout<<"Luas area    2 = ";cin>>z;
cout<<endl;
rect1.set_values (w,y);
rect2.set_values (x,z);
cout<<"HASIL";
cout<<endl<<endl;
cout<<"Rect area    1 = " <<rect1.area()<<endl<<endl;
cout<<"Rect area    2 = " <<rect2.area()<<endl<< endl;
}


PROGRAM SEDERHANA

TUGAS DDP 1

PROGRAM SEDERHANA (1)

#include <iostream>
using namespace std;

class CRectangle {
int x, y;
public:
void set_values (int,int);
int area (void) {
return (x*y);
}
};
void CRectangle::set_values (int a, int b){
x = a ;
y = b ;
}
int main () {
char redo;
system("color 4B");
cout<<endl;
string sambutan="\t\t\t>>>>>>>>>> SELAMAT DATANG <<<<<<<<<<\n\n";
for (int x=0;x<=sambutan.length();x++){
cout<<sambutan[x];
for (double y=0;y<=1990000;y++){
 }}
 do{
CRectangle rect;
int x,y;
cout<<endl<<endl;
cout<<"MENCARI LUAS AREA";
cout<<endl<<endl;
cout<<"Panjang area = ";cin>>x;
cout<<endl;
cout<<"Lebar area   = ";cin>>y;
cout<<endl;
rect.set_values (x,y);
cout <<"Luas Area    = "<< rect.area();
cout<<endl<<endl;
cout<<"\n=========================================================================="<<endl;
cout << "Anda Ingin Mengulangnya Kembali?(Y/T)" << endl; cin >> redo;}
while(redo=='y'||redo=='Y');
cout<<endl<<endl;
cout<<"Terimakasih :) ";

cout<<endl<<endl<<endl<<endl;
cout<<"By : ajie kurnia s s ";
cout<<"\n==========================================================================="<<endl;
}

Penjelasan :
Ada 2 permission label dalam class
CRectangle yakni:
private membernya berupa data x dan y
public membernya adalah fungsi
set_values() dan fungsi area()
Fungsi set_value() didefinisikan diluar
class sehingga harus menggunakan
tanda scope ::
Fungsi area() dideklarasikan di dalam
class

Sabtu, 19 Desember 2015

PROGRAM DEV C++ BIODATA

CONTOH PROGRAM DEV C++ BIODATA

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

/* run this program using the console pauser or add your own getch, system("pause") or input loop */
using namespace std;
void siji () {
  cout<<"nama   : AJIE "<<endl;
  cout<<"kelas : A "<<endl;
  cout<<"prodi : Informatika "<<endl;
  cout<<"asal : LAMPUNG "<<endl;
}
void kalih (){
  cout<<"nama   : WANTO "<<endl;
  cout<<"kelas : A "<<endl;
  cout<<"prodi : Informatika "<<endl;
  cout<<"asal : JABAR "<<endl;
}
void tigo (){
  cout<<"nama   : GONTANG "<<endl;
  cout<<"kelas : E "<<endl;
  cout<<"prodi : Informatika "<<endl;
  cout<<"asal : BANYUMAS "<<endl;
}
int main(int argc, char** argv) {
int x;
system("Color 5A");
    string sambutan="\t\t>>>>>>>>>> BIODATA <<<<<<<<<<\n\n";
    for (int x=0;x<=sambutan.length();x++){
      cout<<sambutan[x];
      for (double y=0;y<=9990000;y++);
      cout<<endl;
cout<<"|===============================|"<<endl;
cout<<"|pilih biodata yang akan dilihat|"<<endl;
cout<<"|===============================|"<<endl<<endl;
cout<<"1. wanto "<<endl;
cout<<"2. okta "<<endl;
cout<<"3. gontang "<<endl<<endl;
cout<<"Masukkan biodata yang ingin anda ketahui : ";
cin>>x;
system("cls");
if(x==1){
siji();
}
else if(x==2){
kalih();
}
else if(x==3){
tigo();
}
else
cout<<"input salah";
return 0;
}}

TAMPILAN :






PEROGRAM ATM C++

Program Dev c++  ATM

"Assalaamu'alaikum"

Halo teman-teman,  kali ini saya akan memberikan tutorial tentang cara membuat
program ATM sederhana dengan menggunakan dev c++
















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

using namespace std;

class ATM {
    public:
        ATM();
        void proses();
    private:
        int a,i,p;
};

ATM::ATM(){
    cout<<"Nama  : ajie"<<endl;
    cout<<"Prodi : Teknik Informatika"<<endl<<endl;
}
           
void ATM::proses(){          
   i =1;
   a =12345;
   while (!(i>3)){
    cout<<"Silahkan Masukkan PIN ATM anda = ";
cin>> p;
    cout<<endl;
    if (p==a){
        i =i+5;
    }
    else{
        cout<<"Pin Salah"<<endl<<endl;
        i =i+1;}
    }
       if (i==6){
      cout<<endl<<endl;
      cout<<"\t\t =============================================="<<endl;
      cout<<"\t\t ----------------------------------------------"<<endl;
      cout<<"\t\t\t SILAHKAN PILIH TRANSAKSI ANDA"<<endl;
      cout<<"\t\t\t      Pecahan Rp. 100.000    "<<endl;
      cout<<"\t\t ----------------------------------------------"<<endl;
      cout<<"\t\t ===============================================\n\n"<<endl<<endl;
      cout<<"\t\t\t1.50.000         5.500.000"          <<endl;
      cout<<"\t\t\t2.100.000        6.750.000"          <<endl;
      cout<<"\t\t\t3.200.000        7.1000.000"         <<endl;
      cout<<"\t\t\t4.300.000        8.TRANSAKSI LAINNYA"<<endl<<endl;
   
    }
   else{
      cout<<"\t\t\tMAAF ATM ANDA SEMENTARA KAMI BLOKIR"<<endl;}
}

int main()
{
    system("Color 1A");
    cout<<endl;
    string sambutan="\t\t>>>>>>>>>>SELAMAT DATANG DI ATM<<<<<<<<<<\n\n";
    for (int x=0;x<=sambutan.length();x++){
     cout<<sambutan[x];
     for (double y=0;y<=9990000;y++){
 }}
     cout<<endl<<endl;
    ATM edet;
    edet.proses();
}

TAMPILAN :


Rabu, 14 Oktober 2015

KALKULATOR SEDERHANA C++

KALKULATOR SEDERHANA


 اَلسَّلاَمُ عَلَيْكُمْ وَرَحْمَةُ اللهِ وَبَرَكَاتُهُ
“Assalaamu‘alaikum warahmatullaahi wabarakaatuh”

Halo teman-teman, kali ini saya akan memberikan tutorial tentang cara membuat
program kalkulator sederhana dengan menggunakan dev c++















ok tanpa basa-basi lagi langsung kita mulai saja !

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

using namespace std;

main()
{
 float pilih, ang1, ang2, hasil;
          string tanya;
     cout<<"                            Assalamualaikum                                         \n";
  cout<<"                        =================                                    \n";
      cout<<"SELAMAT DATANG DIKALKULATOR SEDERHANA INI!  \n";
      cout<<"  ===========================================      \n";
      cout<<"                          AJIE KURNIA S S                                       \n";
      cout<<"                        =================                                    \n";
      cout<<"                               1500018059                                             \n";
      cout<<"                            ============                                          \n"<< endl<<endl;
   
   
      cout<<"==================\n";
      cout<<"=  1. Tambah               =\n";
      cout<<"=  2. Kurang                =\n";
      cout<<"=  3. Perkalian             =\n";
      cout<<"=  4. Pembagian           =\n";
      cout<<"==================\n"<< endl<<endl;
   
      lagi:
      cout<<"Masukan Perhitungan yang anda inginkan   : ";
      cin>>pilih;
      if (pilih==1) {
                   cout<<"Masukan Nilai Pertama       : ";
                   cin>>ang1;
                   cout<<"Masukan Nilai Kedua         : ";
                   cin>>ang2;
                   hasil=ang1+ang2;
                   cout<<"Hasil dari tambahan adalah   : "<< hasil<< endl<< endl<< endl;
                   }
      else if (pilih==2)
      {
                   cout<<"Masukan Nilai Pertama         : ";
                   cin>>ang1;
                   cout<<"Masukan Nilai Kedua           : ";
                   cin>>ang2;
                   hasil=ang1-ang2;
                   cout<<"Hasil dari pengurangan adalah : "<< hasil<< endl<< endl<< endl;
                 
                   }
      else if (pilih==3)
      {
                   cout<<"Masukan Nilai Pertama     : ";
                   cin>>ang1;
                   cout<<"Masukan Nilai Kedua : ";
                   cin>>ang2;
                   hasil=ang1*ang2;
                   cout<<"Hasil dari perkalian adalah : "<< hasil<< endl<< endl<< endl;

                   }
      else if (pilih==4)
      {
                   cout<<"Masukan Nilai Pertama : ";
                   cin>>ang1;
                   cout<<"Masukan Nilai Kedua : ";
                   cin>>ang2;
                   hasil=ang1/ang2;
                   cout<<"Hasilnya Pembagian adalah : "<< hasil<< endl<< endl<< endl;
                 
                   }
      else{
   
                cout<<"Maaf Pilihan yang anda inginkan tidak ada!"<< endl;
      }
      cout<<"Ingin Mengulang Perhitungannya? [y/n] : ";
      cin>>tanya;
      if (tanya == "y" )
      {
  goto lagi;  
      }
   
      if (tanya == "n" )
      {
  goto end;
      }
      end:
      cout<<"Terima kasih telah menggunakan Kalkulator ini";
      getch();

}



TAMPILAN


Itu saja yang bisa saya sampaikan kepada teman-teman
sekalian semoga bermanfaat ,bila ada salah dalam penulisan mohon dimaklumi
saja ..hehehe! :-D  dan saya berterimakasih karna teman-teman telah mengunjungi blog ini. :-) ;-)
wassalam...