1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Vera_Pavlovna [14]
4 years ago
12

.Write an if-else statement for the following:

Computers and Technology
2 answers:
bija089 [108]4 years ago
8 0

Answer:

Solution part of the question:

if(userTickets>5)  //compare the value of userTickets with 5.

       awardPoints = 10; // assign the 10 value to the award point

       else

       awardPoints=userTickets;// assign the userticket value to the awardpoint.

Output:

For the input 4 the output is 4.

For the input 5 the output is 5.

For the input 6 the output is 10.

For the input 7 the output is 10.

Explanation:

All the other part of the program is given on the question so here only if-else statement is given on the answer part. Which is pasted at the place of "/* Your solution goes here */" and the user can get the right answer.

  • In the "if" statement the value of "userTickets" variable is get compared by 5 and if it is greater than 5 than variable "awardpoint" assigns the '10' value.
  • Otherwise, with the help of "else" statement "userticket" variables value (which is the input value for the program) assign to the "awardpoint" variable.
TiliK225 [7]4 years ago
4 0

Answer:if (userTickets < 7 ) {

        awardPoints = 1;

     }

     else {

        awardPoints = userTickets;

     }

Explanation:

You might be interested in
The "great big secret" Ohanian talks about is the idea that:
Sedbober [7]

Answer: presenting a serious cause as something cool will lead to success

7 0
3 years ago
Which of the following guidelines about forwarding e-mail messages is most appropriate?
valentina_108 [34]
The last option: 

Avoid forwarding e-mail messages unless you have permission to do so.
5 0
3 years ago
Read 2 more answers
A cpu with an external clock speed of 2 ghz and a 64-bit data bus can (theoretically) transfer how much data per second?
GREYUIT [131]
The CPU could cycle the bits 2000000000 a second. That means theoretically it could process 16 gigabytes of data a second.
5 0
3 years ago
During project management, who executes tasks and produces the deliverables as stated in the project plan and as directed by the
san4es73 [151]
B. Project team members
8 0
3 years ago
In this lesson you wrote code to make the turtle draw squares. Briefly describe how the code for
ale4655 [162]

Explanation:

that programming language you must use?

3 0
3 years ago
Other questions:
  • Which computer device helps you input data in the form of text, numbers, and commands?
    9·1 answer
  • About how many people live in mexico city A. 9M B. 5M C. 11M
    7·1 answer
  • One important inheritance characteristic is that all entity subtypes inherit their ____ key attribute from their supertype. prim
    9·1 answer
  • OCR Land is a theme park aimed at children and adults. Entrance tickets are sold online. An adult ticket to OCR Land costs £19.9
    7·1 answer
  • Cable television, as well as some networks, uses ________ cable.
    10·1 answer
  • Calculate the data rate capacity for a 2400 baud signal where there are M=8 levels per symbol. a. 2400 bps b. 4800 bps c. 7200 b
    12·1 answer
  • Which of the following was the primary purpose of muckraking, sensationalism, and yellow journalism in the early 1900s?
    11·1 answer
  • Chris is a project manager. He would like to schedule a status meeting for the next week. Several of the group members work at a
    12·1 answer
  • Many companies ban or restrict the use of flash drives
    11·1 answer
  • How does Map Put function work in Java? *
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!