由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - 这个题目什么意思啊?
相关主题
[合集] 和大家再讨论一道面试算法题(MS) (转载)how to reverse a HUGE list?
True or False用STL map的时候怎么自己定义大小比较的关系
一个django问题:debug=true就很好;debug=false,css就找不到[合集] one simple question
如何clean up C语言中的#if condition statement?C++ help: 一个multiple definition problem.
这样的代码有啥意义么CheckForZero
两个简单R代码(坑?)求解[factor][合集] funny code I saw in work
一个读用户输入的小问题比较简单的Java数据输入验证问题
再问个关于中止程序的问题问问题C
相关话题的讨论汇总
话题: cigars话题: enter话题: true话题: party话题: false
进入Programming版参与讨论
1 (共1页)
m******u
发帖数: 12400
1
When squirrels get together for a party, they like to have cigars. A
squirrel party is successful when the number of cigars is between 40 and 60,
inclusive. Unless it is the weekend, in which case there is no upper bound
on the number of cigars. Return true if the party with the given values is
successful, or false otherwise.
Enter number of cigars:
60
Is it a weekend?Enter (true/false):
true
Party successful:true

Enter number of cigars:
40
Is it a weekend?Enter (true/false):
false
Party successful:true
m******u
发帖数: 12400
2
判定周末party成功否的条件是什么?
n*******e
发帖数: 4894
3
if (isWeekend && number>= 40){
return true;
} else if (!isWeekend && 40 <=number<=60){
return true;
} else {
return false;
}

60,
bound

【在 m******u 的大作中提到】
: When squirrels get together for a party, they like to have cigars. A
: squirrel party is successful when the number of cigars is between 40 and 60,
: inclusive. Unless it is the weekend, in which case there is no upper bound
: on the number of cigars. Return true if the party with the given values is
: successful, or false otherwise.
: Enter number of cigars:
: 60
: Is it a weekend?Enter (true/false):
: true
: Party successful:true

m******u
发帖数: 12400
4
ls动作这么快?
m******u
发帖数: 12400
5
就是说周末大于40就可以了?
1 (共1页)
进入Programming版参与讨论
相关主题
问问题C这样的代码有啥意义么
cin.clear() 怎么用两个简单R代码(坑?)求解[factor]
python高手请进,RFC文件转换成kindle格式的代码一个读用户输入的小问题
问个问题再问个关于中止程序的问题
[合集] 和大家再讨论一道面试算法题(MS) (转载)how to reverse a HUGE list?
True or False用STL map的时候怎么自己定义大小比较的关系
一个django问题:debug=true就很好;debug=false,css就找不到[合集] one simple question
如何clean up C语言中的#if condition statement?C++ help: 一个multiple definition problem.
相关话题的讨论汇总
话题: cigars话题: enter话题: true话题: party话题: false