KPK is a continuation of the Guild's Smallest Multiples.
The definition of multiples are multiples of a number.
Example: Multiples of the number 3 is 3, 6, 9, 12, 15, ... (etc. ..)
Another example: Multiples of the number 4 is 4, 8, 12, 16, 20, ... (etc. ..)
Examples go again: Multiples of the number 6 is 6, 12, 18, 24, 30 ... (and so on ..)
The definition of multiples are multiples of a number.
Example: Multiples of the number 3 is 3, 6, 9, 12, 15, ... (etc. ..)
Another example: Multiples of the number 4 is 4, 8, 12, 16, 20, ... (etc. ..)
Examples go again: Multiples of the number 6 is 6, 12, 18, 24, 30 ... (and so on ..)
Here also made a program using the C language, this program can help to find a KPK. Consider the following source code:
#include
using namespace std;
class kpk {
public:
void input();
void output();
void proses();
private:
int a,b,c;
int nilai;
};
void kpk::input(){
cout<<"Masukkan Nilai Bil A : "; cin>>a;
cout<<"Masukkan Nilai Bil B : "; cin>>b;
}
void kpk::proses(){
for(int x=1;x<=b;x++)
nilai=nilai+a;
if(nilai % b==0);
}
void kpk::output()
{
}
int main(){