Java程序辅导

C C++ Java Python Processing编程在线培训 程序编写 软件开发 视频讲解

客服在线QQ:2653320439 微信:ittutor Email:itutor@qq.com
wx: cjtutor
QQ: 2653320439

No. You need 4 cups of flour and 2 cups of sugar.Now you have more than enough flour, but not enough sugar,so you can't follow the recipe.

Cookie Calculator

In order to bake cookies two things must be true:

If just one of these is false, then you do nothave enough ingredients.Here is a simulation of the cookie program.Enter some values for sugar and flour andsee if you can bake cookies.Use only integers as input.


How much flour do you have? 

How much sugar do you have? 

  

The symbol && means AND. The if statement asks a question with two parts:

Each part is a relational expression.A relational expressionuses a relational operatorto compute a true or false value.The entire expression between parentheses is also a booleanexpression.A boolean expression is often composedof smaller boolean expressions.This is similar to human language where compound sentencesare made from smaller sentences.

QUESTION 3:

Say that you enter 9 for flour and 1 for sugar.What value (true or false) does each part give you?