Bilangan 1-n

21 Jun

#include
#include

class ping{
friend ostream& operator <> (istream& , ping& );
public:
ping();
// int pingan();
private:
int i, x;
};

ping::ping(){
cout<> (istream& in, ping& t){

cout<>t.x;

return in;
}
/*int ping::pingan(){
return ;
}*/
ostream& operator << (ostream& out, ping& t){
for(t.i=1;t.i<=t.x;t.i++){
out<<t.i<<" "<>k;

cout << k;
getch();
}

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: