Minggu, 21 Oktober 2012

struct borland C++

Buat adik2 mahasiswa yg kesulitan mengerti apa itu struct......yuukk mari kita lihat program di bawah....!!!!

tapi jagn copas doank....dalami resapi dan rasakan...hahahah

Senin, 15 Oktober 2012

penjumlahan dan perkalian array dua dimensi

nah ini bagi yang pusing2 bikin script bagaikan benang kusut....mendingan contek az script ini...hahahah





#include <iostream>
#include <conio>


int main(){
typedef int matrik[100][100];

matrik a,b,c;
int x,y,d,e,f;
cout<<"\n masukkan jml matrik pertama  =";cin>>d;
cout<<"\n masukkan jml marik kedua  =";cin>>e;

cout<<"========================================"<<endl;
cout<<"1.penjumlahan"<<endl;
cout<<"2.perkalian"<<endl;
cout<<"========================================"<<endl;

cout<<" masukkan operator (1/2)  :";cin>>f;

for(x=0;x<d;x++)
{
for(y=0;y<e;y++)
{
cout<<"matrik a["<<x<<"]["<<y<<"]=";
cin>>a[x][y];}

}cout<<endl;

for(x=0;x<d;x++)
{
for(y=0;y<e;y++)
{
cout<<"matrik b["<<x<<"]["<<y<<"]=";
cin>>b[x][y];
}
}cout<<endl;

if(f==1)
{
for(x=0;x<d;x++)
{
for(y=0;y<e;y++)
{
c[x][y]=a[x][y]+b[x][y];
}
}
for(x=0;x<d;x++)
{
for(y=0;y<e;y++)
{
cout<<"hasil = matrik c["<<x<<"]["<<y<<"]= "<<c[x][y]<<endl;
}}}
else if(f==2)
{
for(x=0;x<d;x++)
{
for(y=0;y<e;y++)
{
c[x][y]=a[x][y]*b[x][y];
}
}

for(x=0;x<d;x++)
{
for(y=0;y<e;y++)
{
cout<<"hasil = matrik c["<<x<<"]["<<y<<"]= "<<c[x][y]<<endl;
}}
}
getch();}

Edit Data Array 2 Dimensi


ini buat yg masih bingung bagaimana cara  edit data pada array 2 dimensi...yuuuk mari kita simak !!!!!!




#include <iostream>
#include <conio>


int main(){
typedef int matrik[100][100];

matrik a;
int b,c,x,y,d,e,f;
cout<<"\n masukkan kolom  =";cin>>d;
cout<<"\n masukkan baris  =";cin>>e;


for(x=0;x<d;x++)
{
for(y=0;y<e;y++)
{
cout<<"\nmatrik a["<<x<<"]["<<y<<"]=";
cin>>a[x][y];}

}cout<<endl;

cout<<"======================================"<<endl;
cout<<"masukkan data yg akan di edit =\n";
cin>>f;
for(x=0;x<d;x++)
{
for(y=0;y<e;y++)
{
if(a[x][y]==f)
{cout<<"\n masukkan data yg baru =";
cin>>c;
a[x][y]=c;
     }
   }
}

cout<<"\n matrik yg baru =\n";
for(x=0;x<d;x++)
{
for(y=0;y<e;y++)
{cout<<a[x][y]<<"\t";
}
cout<<"\n";
}

getch(); }

Rabu, 16 Mei 2012

PROGRAM C++ PERHITUNGAN PERULANGAN


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


main()
{
char a;
int b,c,d,e,luas,vol;

cout<<"\n menghitung luas sisi balok dan volume kubus"<<endl;
cout<<" 1. luas sisi balok"<<endl;
cout<<" 2.volume balok "<<endl;

cout<<"pilih rumus yg akan di hitung(1/2)  =";cin>>a;

cout<<"masukkan jumlah perhitungan =";cin>>e;
for(int i=1;i<=e;i++)
{
cout<<"\npanjang =";cin>>b;
cout<<"\nlebar =";cin>>c;
cout<<"\ntinggi =";cin>>d;

luas=4*b*c+2*d*d;
vol=b*c*d;

switch(a)
{
case'1':
cout<<"luas sisi balok ="<<luas<<endl;
break;
case'2':
cout<<"volume balok ="<<vol<<endl;
break;
default:cout<<"pilihan yg anda masukkan salah"<<endl;
}}



getch();
}

Selasa, 03 April 2012

PROGRAM KALKULATOR SEDERHANA

Jumat, 16 Maret 2012

NOKIA LUMIA 800


Senin, 12 Maret 2012

cheat empire's and allies game facebook

Template by:

Free Blog Templates