programming to find whether the year is a leap year or not

In this post I will post about programming c + + to determinewhether the Thun leap year or not by using a class overload.
Well as its coding is:

# include <iostream.h>
# include <conio.h>

class moon{
friend istream& operator>>(istream&, moon&);

public:
bulan(unsigned int b=0){number=b;}
void count();
private:
unsigned int count;

};
istream& operator>>(istream&in,moon& x){
cout<<” enter the month to: :”;
in>>x.number;
return in;
}
void moon::count(){
switch(number){


case 1 : cout<<“Month that you type is  january”;break;
case 2 : cout<<“Month that you type is febuary”;break;
case 3 : cout<<” Month that you type is Mar”;break;
case 4 : cout<<“Month that you type is April”;break;
case 5: cout<<“Month that you type is Mei”;break;
case 6:cout<<” Month that you type is Juni”;break;
case 7:cout<<“Month that you type is July”;break;
case 8:cout<<” Month that you type is Agusts”;break;
case 9:cout<<” Month that you type is September”;break;
case 10:cout<<“Month that you type is October”;break;
case 11:cout<<” Month that you type is November”;break;
case 12:cout<<“Month that you type is December”;break;
default :cout<<” nothing”;break;
}
}
int main(){
moon what;
cin>>what;
what.count();
getch();
}

 something like that coding program. please try and compile it onyour computer.
thank you🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: