Clock

Senin, 07 April 2014

mdm

demo template blog and download free blogger template feature like magazine style, ads ready and seo friendly template blog
#include <cstdlib>
#include <iostream>

using namespace std;

int main(int argc, char *argv[])
{
int a[2];
int b[3];
int d,t;
cout<<"* Masukan Jumlah Anggota 1 : ";
cin>>d;
cout << "Masukkan himpunan 1 : \n";
for(int n=0; n<d;n++) {
cin >>a[n];
}
cout<<endl;
cout<<"* Masukan Jumlah Anggota 2: ";
cin>>t;
cout << "Masukkan himpunan 2 : \n";
for(int m=0; m<t ; m++) {
cin >> b[m];
}
cout<<endl;
cout<<"============================================"<<endl;
cout << "Maka relasi A yang habis di bagi B : {";
for(int x=0; x<d;){
for(int y=0; y<t; y++) {
        int k=a[x];
        int l=b[y];
        if (k%l==0){
cout << "(" << a[x] << "," << b[y] << ")";}
}
x++;
}
cout << "}" << endl;
cout<<"============================================"<<endl;
cout<<endl;
    system("PAUSE");
    return EXIT_SUCCESS;
}

0 komentar:

Posting Komentar