×

Loading...
Ad by
  • 推荐 OXIO 加拿大高速网络,最低月费仅$40. 使用推荐码 RCR37MB 可获得一个月的免费服务
Ad by
  • 推荐 OXIO 加拿大高速网络,最低月费仅$40. 使用推荐码 RCR37MB 可获得一个月的免费服务

C++

Did you ever learn language C++(Computer program language)
in your colleague? IF yes, try this:

#define AND &&

RESULT love(boy, girl)

{
  if( boy.有房() AND boy.有车() )
  {
   boy.Set(Nothing);
   return girl.嫁给(boy);
  }
  else if( girl.愿意等() )
  {
   next_year:
   for( day=1; day<=365; day++)
   {
    if( day == 情人节 )
     if( boy.GiveGirl(玫瑰) )
      girl.感情++;
     else
      girl.感情--;
    if( day == girl.生日)
     if( boy.GiveGirl(玫瑰) )
      girl.感情++;
     else
      girl.感情--;
    boy.拼命赚钱();
   }
   年龄++;
   girl.感情--;
   if( boy.有房() AND boy.有车() )
   {
    boy.Set(Nothing);
    return girl.嫁给(boy);
   }
   else if( boy.赚钱 > 100,000 AND girl.感情 > 8 )
    goto next_year;
   else
    return girl.goto( another_boy);
  }
  return girl.goto( another_boy);
}
Report

Replies, comments and Discussions:

  • 枫下沙龙 / 谈天说地 / C++
    Did you ever learn language C++(Computer program language)
    in your colleague? IF yes, try this:

    #define AND &&

    RESULT love(boy, girl)

    {
      if( boy.有房() AND boy.有车() )
      {
       boy.Set(Nothing);
       return girl.嫁给(boy);
      }
      else if( girl.愿意等() )
      {
       next_year:
       for( day=1; day<=365; day++)
       {
        if( day == 情人节 )
         if( boy.GiveGirl(玫瑰) )
          girl.感情++;
         else
          girl.感情--;
        if( day == girl.生日)
         if( boy.GiveGirl(玫瑰) )
          girl.感情++;
         else
          girl.感情--;
        boy.拼命赚钱();
       }
       年龄++;
       girl.感情--;
       if( boy.有房() AND boy.有车() )
       {
        boy.Set(Nothing);
        return girl.嫁给(boy);
       }
       else if( boy.赚钱 > 100,000 AND girl.感情 > 8 )
        goto next_year;
       else
        return girl.goto( another_boy);
      }
      return girl.goto( another_boy);
    }
    • 哇塞,这么多的if条件,很容易走岔道的哦 :P
    • girl要加多一个限制条件,if girl.age() > 30, 即使"boy.有房() AND boy.有车() "的条件为N,还有那些条件都不满足,还是会return girl.嫁给(boy); 的~
    • 你们简直太那个了, 如果女的房子跟大,车子更豪华又如合?
      • 哈哈,哪她就会找象你这样一枝花的男人了。:)
        • 一枝狗尾巴花 :->
    • how about you? lemondy. :D
      • lemondy.有房() or lemondy.有车() or lemondy.有钱() = False
        • too smart, lemondy. ^_^
    • not a good object orient program. rewrite it. add some exception handle sentences.