PROGRAM TO FIND THE KPK


Corruption Eradication Commission (KPK) will propose rules on corruption must return the money and corruption. Not only are the actors themselves, but also their families and relatives. The proposal would be pushed into the draft Bill (the Bill) Eradication of Corruption. opss,,,,,,, but this one is not seeprti laen you read above, the KPK that I discuss is the smallest community Multiples of 2 pieces of numbers that is often discussed in math.

A simple way can be used to find the Commission of two numbers that are not too large, but for larger numbers should use a factorial manner. examine the following example:

Finding Commission of 12 and 20:
Multiples of 12 = 12, 24, 36, 48, 60, 72, 84, ...
Multiples of 20 = 20, 40, 60, 80, 100, 120, 140, ...
Commission of 12 and 20 are multiples of allies (the same) are the smallest, ie 60

or can also use the program for those who already know and understand in making a program, here's one example program to seek Commission of two pieces bilngan, please understand I hope to make an inspiration to you;

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

kpk1 class {
     friend ostream & operator <<(ostream &, kpk1 &);
     friend istream & operator>> (istream &, kpk1 &);
public:
     kpk1 ();
    kpk1_KPK void () {
                    value = 0;
                for (int z = 1; z <= b; z + +)
                         {
                     value = value + a;
                     if (value% b == 0);
                         }
                         ;}
private:
     int a, b, value;
     };
kpk1:: kpk1 () {
    court <<"\ t \ tSlamet Islan Al Hidayah" <<endl;
    court <<"\ t \ t 10018075" <<endl;
    court <<endl;
    court <<"Program To find KPK" <<endl;
    court <<endl;
    }

istream & operator>> (istream & ins, kpk1 & mlebu) {
    court <<"Enter a number:";
    in>> mlebu.a;
    court <<"Enter a number B:";
    in>> mlebu.b;
    return in;
    }

ostream & operator <<(ostream & out, kpk1 & metu) {
    court <<endl;
    court <<"KPK from" <<metu.a <<"and" <<metu.b <<"is:" <<metu.nilai <<endl;
    return out;
    }

main () {
kpk1 z;
cin>> z;
z.kpk1_KPK ();
court <<z;

getch ();
return 0;
}
Output :


Well that's the program that I can make,,,,,!
If there are less jelass know any mistake, do not hesitate to leave a comment ataun advice. So that I can fix it later terimakasihh over his visit,,
Regards super ..

0 Response to " PROGRAM TO FIND THE KPK "