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 theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.
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 theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.
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 theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.
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 theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.
This is default featured slide 5 title
Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.
Minggu, 20 Maret 2011
BAHASA JAVA DAN OOP
MENGGABUNGKAN DUA STRING
#include
#include
char namamu [50] nama copy [50];
void maint(){
cout<<"tuliskan nama anda">>
cin>> nama kamu;
strcpy(nama anda.nama copy);
getchar();
}
Kamis, 17 Maret 2011
TUGAS ALGORITMA
Selasa, 15 Maret 2011
menghitung luas segitiga dengan menggunakan class
#include<iostream.h>
class Luas
{
protected : int panjang, lebar;
public : void nilai(int a, int b)
{ panjang=a; lebar=b; }
};
class Persegi : public Luas
{
public : int area(void)
{ return(panjang*lebar); }
};
class Segitiga : public Luas
{
public : int area(void)
{ return(panjang*lebar/2); }
};
int main()
{ int a,b;
Persegi psg;
Segitiga sgt;
cout<<"Luas Persegi dan Segitiga"<<endl;
cout<<"Masukan Panjang =";cin>>a;
cout<<"Masukan Lebar =";cin>>b;
psg.nilai(a,b);
sgt.nilai(a,b);
cout<<"------------Output-------------"<<endl;
cout<<"Luas Persegi =";cout<<psg.area()<<endl;
cout<<"Luas Segitiga =";cout<<sgt.area()<<endl;
return 0;
}










