#include <cstdlib>
#include <iostream>
using namespace std;
class genap
{
public:
genap();
void cetak_genap ();
private:
int i;
};
genap::genap() {
cout<<"program menampilkan bilangan genap "<<endl;
}
void genap::cetak_genap () {
for(i=i; i<=100; i++) {
if(i&2==0)
cout<<i<<endl;
{
}
int main(int argc, char *argv[])
{
genap abc;
abc.cetak_genap ();
system("PAUSE");
return EXIT_SUCCESS;
}
#include <iostream>
using namespace std;
class genap
{
public:
genap();
void cetak_genap ();
private:
int i;
};
genap::genap() {
cout<<"program menampilkan bilangan genap "<<endl;
}
void genap::cetak_genap () {
for(i=i; i<=100; i++) {
if(i&2==0)
cout<<i<<endl;
{
}
int main(int argc, char *argv[])
{
genap abc;
abc.cetak_genap ();
system("PAUSE");
return EXIT_SUCCESS;
}
Tidak ada komentar:
Posting Komentar