/*
mencari KPK
misal input
a = 4 , b = 6
kpknya = 12
*/
#include
#include
using namespace std;
int main(int argc, char *argv[])
{
int a, b, angka, data=0;
cout<<"a = ";
cin>>a;
cout<<"b = ";
cin>>b;
angka=a;
while(data==0)
{
if((angka%a==0)&&(angka%b==0))
{
cout<<"KPK = "<
}
angka++;
}
cout<
return EXIT_SUCCESS;
}
0 komentar:
Posting Komentar