About

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.

Senin, 25 Februari 2013

Perkalian C++ Menggunakan Class

#include <cstdlib>
#include <iostream>

using namespace std;
class Lingkaran{
      public:
             void input();
             int proses();
             void output();
      private :
              int bil1, bil2;
              float hasil;
             
      protected:    
      };
 void Lingkaran :: input(){
     
      cout<<"Masukan nilai bilangan 1 :";
      cin>>bil1;
      cout<<"masukan nilai bilangan 2 :";
      cin>>bil2;
      }
 int Lingkaran :: proses(){
          hasil = bil1*bil2;
          //return hasil;
          }
         
 void Lingkaran :: output(){
          cout<<"hasil :";
          cout<<hasil;
          cout<<endl <<endl;
          }   
int main(int argc, char *argv[])
{
    Lingkaran run;
    run.input();
    run.proses();
    run.output();
    system("PAUSE");
    return EXIT_SUCCESS;
}