Classic C ++ program

xiaoxiao2021-03-06  59

#define and && 

Result Love (Boy, Girl) 

{ 

Try {// Abnormal processing is necessary! As a good programmer, we must not forget

IF (boy. There is a room () and boy. There is a car ()) 

{ 

Boy.set (Nothing);

While (boy. Marriage (Girl) == Failed) {// This step is absolutely can't stand the failure, so the loop must be

Take a second ();

    

Notice to prepare for marriage ();

Return Girl. Marry (BOY);

    

Else IF (Girl. Willing, etc. ())

{ 

Next_Year: 

For (day = 1; day <= 365; day ) 

{ 

IF (DAY == Valentine's Day)

IF (Boy.givegirl (Rose))

Girl. Feelings ;

Else 

Girl. feelings -;

IF (day == girl. birthday) 

IF (Boy.givegirl (Rose))

Girl. Feelings ;

Else 

Girl. feelings -;

Make money in order to make money ();

    

Age ;

Girl. feelings -;

IF (boy. There is a room () and boy. There is a car ()) 

{ 

Boy.set (Nothing);

While (boy. Marriage (Girl) == Failed) {

Take a second ();

    

Notice to prepare for marriage ();

Return Girl. Marry (BOY);

    

Else IF! (Boy. Make money> 100,000 and girl. Emotion> 8)

Goto next_year;

Else {

Return boy.findanothergirl (); //  天涯 where there is no grass, robbery can do

}

    

Else // If there is no money, no car is not willing, then use / 'next scheme /'

{

IF (boy. Suicide () == Success) {

Notice to prepare for marriage ();

Return Girl. Marrying (BOY);

}

Else

{

Boy. Girls (Girl);

Return all ends;

}

}

} Catch (Gilr_ sudden death) {// abnormal situation is very much, so give full play to thinking ability

Cry (Girl);

Boy.Findanothergirl (); // Where is the grass without a grass,

Return failed;

} catch (boy_ loves others) {// The world is so big, the beauty is so much.

Boy. Abandon (Girl);

Return Boy. Transfer Target ();

} catch (Gilr_ loves others) {// The world is so big, the hateful man is more.

Cry (Girl);

IF (Boy. Lesson (this man) == Success) {

Return Boy. Continue (Girl);

}

Else

{

Return boy.findanothergirl (); // Where is the grass in the world,

}

} catch (...) {// There will always be something that cannot be pre-expensive

Boy.Findanothergirl (); // Looking for other girls who don't have an exception,

Return failed;

}

Return Girl.goto (Another_boy);

}

转载请注明原文地址:https://www.9cbs.com/read-82723.html

New Post(0)